Skip to content

Commit 4ae5922

Browse files
committed
fix: wrong slider background in dark mode
1 parent 260f589 commit 4ae5922

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

scss/_switches.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
display: block;
2020
height: inherit;
2121
cursor: pointer;
22-
background-color: $white;
23-
border: $border-width solid $border-color;
22+
border: $border-width solid;
2423
transition: .15s ease-out;
2524
@include border-radius($border-radius);
2625

26+
@include themes($form-theme-map) {
27+
background-color: themes-get-value("input-bg");
28+
border-color: themes-get-value("input-border-color");
29+
}
30+
2731
&::before {
2832
position: absolute;
2933
top: $switch-handle-margin;

scss/mixins/_switches.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
@mixin switch-outline-variant($color) {
5858
.c-switch-input:checked + .c-switch-slider {
59-
background-color: $white;
59+
background-color: inherit;
6060
border-color: $color;
6161

6262
&::before {
@@ -70,7 +70,7 @@
7070

7171
@mixin switch-opposite-variant($color) {
7272
.c-switch-input:checked + .c-switch-slider {
73-
background-color: $white;
73+
background-color: inherit;
7474
border-color: $color;
7575

7676
&::before {

0 commit comments

Comments
 (0)