Skip to content

Commit

Permalink
[BasicUI] Fix dark theme for selection popups (#2187)
Browse files Browse the repository at this point in the history
Fix #2142

Add a border to the popup.
Also update the separator color (make it more visible) in dark theme.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored Nov 30, 2023
1 parent 4be00c2 commit 18e93f5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 3 additions & 0 deletions bundles/org.openhab.ui.basic/web-src/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@
&__item {
border-bottom: 1px solid $item-separator-color;
padding-left: 20px;
&:last-child {
border: none;
}
}
&__group &__label {
padding-top: 17px;
Expand Down
26 changes: 23 additions & 3 deletions bundles/org.openhab.ui.basic/web-src/_theming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ body[data-theme="bright"] {
--switch-off-track-bg: rgba(0,0,0,.26);
--switch-on-track-bg: #9fa8da;
--border-color: #ccc;
--radio-unchecked-color: rgba(0,0,0,.5);
--input-undef-color: rgba(0,0,0,.26);
--input-icon-filter: invert(0%);
--button-color: #000000;
Expand All @@ -22,7 +23,8 @@ body[data-theme="dark"] {
--container-text-color: #c0c0c0;
--switch-off-track-bg: rgba(255,255,255,.26);
--switch-on-track-bg: #9fa8da;
--border-color: #343434;
--border-color: #545454;
--radio-unchecked-color: rgba(255,255,255,.5);
--input-undef-color: rgba(158,158,158,.26);
--input-icon-filter: invert(100%);
--button-color: #e0e0e0;
Expand All @@ -38,6 +40,7 @@ body[data-theme="system"] {
--switch-off-track-bg: rgba(0,0,0,.26);
--switch-on-track-bg: #9fa8da;
--border-color: #ccc;
--radio-unchecked-color: rgba(0,0,0,.5);
--input-undef-color: rgba(0,0,0,.26);
--input-icon-filter: invert(0%);
--button-color: #000000;
Expand All @@ -51,7 +54,8 @@ body[data-theme="system"] {
--container-text-color: #c0c0c0;
--switch-off-track-bg: rgba(255,255,255,.26);
--switch-on-track-bg: #9fa8da;
--border-color: #343434;
--border-color: #545454;
--radio-unchecked-color: rgba(255,255,255,.5);
--input-undef-color: rgba(158,158,158,.26);
--input-icon-filter: invert(100%);
--button-color: #e0e0e0;
Expand All @@ -70,7 +74,8 @@ body {
background-color: var(--body-bg, #f5f5f5) !important;
}

.mdl-form {
.mdl-form,
.mdl-radio__group {
background-color: #fff !important;
background-color: var(--container-bg, #fff) !important;
color: #616161 !important;
Expand Down Expand Up @@ -104,6 +109,21 @@ body {
background: var(--primary-color, #3f51b5);
}

.mdl-radio__group {
border: 3px solid #ccc;
border: 3px solid var(--border-color, #ccc);
}

.mdl-radio__item {
border-bottom: 1px solid #ccc;
border-bottom: 1px solid var(--border-color, #ccc);
}

.mdl-radio:not(.is-checked) .mdl-radio__outer-circle {
border-color: rgba(0,0,0,.5);
border-color: var(--radio-unchecked-color, rgba(0,0,0,.5));
}

.mdl-button {
color: #000000;
color: var(--button-color, #000000);
Expand Down

0 comments on commit 18e93f5

Please sign in to comment.