From 02a8160e4552f67461dfccc5054713d8dbc13365 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 31 Aug 2021 23:44:22 -0400 Subject: [PATCH] Revert label-less checkbox support --- src/elements/emby-checkbox/emby-checkbox.js | 4 +--- src/elements/emby-checkbox/emby-checkbox.scss | 11 ----------- src/themes/appletv/theme.css | 9 --------- src/themes/blueradiance/theme.css | 9 --------- src/themes/dark/theme.css | 9 --------- src/themes/light/theme.css | 9 --------- src/themes/purplehaze/theme.css | 11 ----------- src/themes/wmc/theme.css | 9 --------- 8 files changed, 1 insertion(+), 70 deletions(-) diff --git a/src/elements/emby-checkbox/emby-checkbox.js b/src/elements/emby-checkbox/emby-checkbox.js index 4472ce1ac3..ef21ff8136 100644 --- a/src/elements/emby-checkbox/emby-checkbox.js +++ b/src/elements/emby-checkbox/emby-checkbox.js @@ -65,9 +65,7 @@ import 'webcomponents.js/webcomponents-lite'; const uncheckedHtml = ''; labelElement.insertAdjacentHTML('beforeend', '' + checkHtml + uncheckedHtml + ''); - if (labelTextElement) { - labelTextElement.classList.add('checkboxLabel'); - } + labelTextElement.classList.add('checkboxLabel'); this.addEventListener('keydown', onKeyDown); diff --git a/src/elements/emby-checkbox/emby-checkbox.scss b/src/elements/emby-checkbox/emby-checkbox.scss index e839e44f61..b33a216140 100644 --- a/src/elements/emby-checkbox/emby-checkbox.scss +++ b/src/elements/emby-checkbox/emby-checkbox.scss @@ -22,10 +22,6 @@ display: flex; } -.checkboxContainer-noText { - margin-bottom: 0; -} - .checkboxListContainer { margin-bottom: 1.8em; } @@ -67,10 +63,6 @@ justify-content: center; } -.checkboxContainer-noText .checkboxOutline { - top: auto; -} - .checkboxIcon { font-size: 1.6em; color: #fff; @@ -81,19 +73,16 @@ display: none; } -.emby-checkbox:checked + .checkboxOutline > .checkboxIcon-checked, .emby-checkbox:checked + span + .checkboxOutline > .checkboxIcon-checked { /* background color set by theme */ display: flex !important; } -.emby-checkbox:checked + .checkboxOutline > .checkboxIcon-unchecked, .emby-checkbox:checked + span + .checkboxOutline > .checkboxIcon-unchecked { /* background color set by theme */ display: none !important; } -.emby-checkbox:checked[disabled] + .checkboxOutline > .checkboxIcon, .emby-checkbox:checked[disabled] + span + .checkboxOutline > .checkboxIcon { background-color: rgba(0, 0, 0, 0.26); } diff --git a/src/themes/appletv/theme.css b/src/themes/appletv/theme.css index 2ce01fe025..535e18ff99 100644 --- a/src/themes/appletv/theme.css +++ b/src/themes/appletv/theme.css @@ -294,14 +294,6 @@ html { border: 0.07em solid rgba(0, 0, 0, 0.158); } -.emby-checkbox:focus + .checkboxOutline { - border-color: #fff; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #00a4dc; -} - .emby-checkbox:checked + span + .checkboxOutline, .emby-select-withcolor:focus { border-color: #00a4dc; @@ -329,7 +321,6 @@ html { margin: 0.4rem 0.5rem 0.4rem 0.5rem; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border-color: #00a4dc; } diff --git a/src/themes/blueradiance/theme.css b/src/themes/blueradiance/theme.css index 4e338fb1c1..76275f5c16 100644 --- a/src/themes/blueradiance/theme.css +++ b/src/themes/blueradiance/theme.css @@ -308,14 +308,6 @@ html { color: #fff !important; } -.emby-checkbox:focus + .checkboxOutline { - border-color: #fff; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #00a4dc; -} - .emby-checkbox:checked + span + .checkboxOutline { border-color: #00a4dc; } @@ -329,7 +321,6 @@ html { background-color: #00a4dc; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border-color: #00a4dc; } diff --git a/src/themes/dark/theme.css b/src/themes/dark/theme.css index 76ab9299fd..f1c17fe9fd 100644 --- a/src/themes/dark/theme.css +++ b/src/themes/dark/theme.css @@ -289,14 +289,6 @@ html { color: #fff !important; } -.emby-checkbox:focus + .checkboxOutline { - border-color: #fff; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #00a4dc; -} - .emby-checkbox:checked + span + .checkboxOutline { border-color: #00a4dc; } @@ -310,7 +302,6 @@ html { background-color: #00a4dc; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border-color: #00a4dc; } diff --git a/src/themes/light/theme.css b/src/themes/light/theme.css index 0784726e5e..a241c80567 100644 --- a/src/themes/light/theme.css +++ b/src/themes/light/theme.css @@ -293,14 +293,6 @@ html { border: 0.07em solid rgba(0, 0, 0, 0.158); } -.emby-checkbox:focus + .checkboxOutline { - border-color: #000; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #00a4dc; -} - .emby-checkbox:checked + span + .checkboxOutline, .emby-select-withcolor:focus { border-color: #00a4dc; @@ -315,7 +307,6 @@ html { background-color: #00a4dc; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border-color: #00a4dc; } diff --git a/src/themes/purplehaze/theme.css b/src/themes/purplehaze/theme.css index 92805ebcaa..474d6b08f4 100644 --- a/src/themes/purplehaze/theme.css +++ b/src/themes/purplehaze/theme.css @@ -393,21 +393,11 @@ a[data-role=button] { color: #fff !important; } -.emby-checkbox:focus + .checkboxOutline { - border-color: #ff77f1; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #030322; - border: 0.14em solid rgb(72, 195, 200); -} - .emby-checkbox:checked + span + .checkboxOutline { background-color: #030322; border: 0.14em solid rgb(72, 195, 200); } -.emby-checkbox:checked + .checkboxOutline > .minimalCheckboxIcon-checked, .emby-checkbox:checked + span + .checkboxOutline > .checkboxIcon-checked { color: rgb(12, 232, 214); } @@ -416,7 +406,6 @@ a[data-role=button] { border-color: #ff77f1; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border: 0.14em solid #ff77f1; } diff --git a/src/themes/wmc/theme.css b/src/themes/wmc/theme.css index 5848456689..3004a2db5b 100644 --- a/src/themes/wmc/theme.css +++ b/src/themes/wmc/theme.css @@ -276,14 +276,6 @@ html { border: 0.07em solid rgba(255, 255, 255, 0.135); } -.emby-checkbox:focus + .checkboxOutline { - border-color: #fff; -} - -.emby-checkbox:checked + .checkboxOutline { - background-color: #00a4dc; -} - .emby-checkbox:checked + span + .checkboxOutline, .emby-select-withcolor:focus { border-color: #00a4dc; @@ -298,7 +290,6 @@ html { background-color: #00a4dc; } -.emby-checkbox:focus:not(:checked) + .checkboxOutline, .emby-checkbox:focus:not(:checked) + span + .checkboxOutline { border-color: #00a4dc; }