This commit is contained in:
Vince
2021-12-14 17:05:54 +08:00
parent b4c6ba0cf6
commit 332842024f
4 changed files with 14 additions and 21 deletions

View File

@@ -3342,6 +3342,7 @@ switch {
background-color: rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.5);
background-clip: padding-box; background-clip: padding-box;
font-size: 0; font-size: 0;
color: transparent;
} }
switch:checked { switch:checked {
@@ -3352,21 +3353,17 @@ switch:disabled {
opacity: 0.5; opacity: 0.5;
} }
switch image {
margin: -8px;
-gtk-icon-transform: scale(0);
}
switch slider { switch slider {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1); transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
min-width: 20px; min-width: 20px;
min-height: 20px; min-height: 20px;
margin: 1px; margin: 0;
border-radius: 9999px; border-radius: 9999px;
outline: none; outline: none;
box-shadow: none; box-shadow: none;
background-color: white; background-color: white;
border: none; border: none;
color: transparent;
} }
switch:focus slider, switch:hover slider, switch:focus:hover slider { switch:focus slider, switch:hover slider, switch:focus:hover slider {

View File

@@ -3342,6 +3342,7 @@ switch {
background-color: rgba(0, 0, 0, 0.38); background-color: rgba(0, 0, 0, 0.38);
background-clip: padding-box; background-clip: padding-box;
font-size: 0; font-size: 0;
color: transparent;
} }
switch:checked { switch:checked {
@@ -3352,11 +3353,6 @@ switch:disabled {
opacity: 0.5; opacity: 0.5;
} }
switch image {
margin: -8px;
-gtk-icon-transform: scale(0);
}
switch slider { switch slider {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1); transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
min-width: 20px; min-width: 20px;
@@ -3367,6 +3363,7 @@ switch slider {
box-shadow: none; box-shadow: none;
background-color: white; background-color: white;
border: none; border: none;
color: transparent;
} }
switch:focus slider, switch:hover slider, switch:focus:hover slider { switch:focus slider, switch:hover slider, switch:focus:hover slider {

View File

@@ -3351,6 +3351,7 @@ switch {
background-color: rgba(0, 0, 0, 0.38); background-color: rgba(0, 0, 0, 0.38);
background-clip: padding-box; background-clip: padding-box;
font-size: 0; font-size: 0;
color: transparent;
} }
switch:checked { switch:checked {
@@ -3361,11 +3362,6 @@ switch:disabled {
opacity: 0.5; opacity: 0.5;
} }
switch image {
margin: -8px;
-gtk-icon-transform: scale(0);
}
switch slider { switch slider {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1); transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
min-width: 20px; min-width: 20px;
@@ -3376,6 +3372,7 @@ switch slider {
box-shadow: none; box-shadow: none;
background-color: white; background-color: white;
border: none; border: none;
color: transparent;
} }
switch:focus slider, switch:hover slider, switch:focus:hover slider { switch:focus slider, switch:hover slider, switch:focus:hover slider {

View File

@@ -2172,6 +2172,7 @@ switch {
background-color: $text-disabled; background-color: $text-disabled;
background-clip: padding-box; background-clip: padding-box;
font-size: 0; font-size: 0;
color: transparent;
&:checked { &:checked {
background-color: $primary; background-color: $primary;
@@ -2180,21 +2181,22 @@ switch {
&:disabled { opacity: 0.5; } &:disabled { opacity: 0.5; }
// hide on/off icons for >=3.24.5 // hide on/off icons for >=3.24.5
image { // image {
margin: -8px; // margin: -8px;
-gtk-icon-transform: scale(0); // -gtk-icon-transform: scale(0);
} // }
slider { slider {
transition: all $duration $ease-out; transition: all $duration $ease-out;
min-width: $small-size - 4px; min-width: $small-size - 4px;
min-height: $small-size - 4px; min-height: $small-size - 4px;
margin: 1px; margin: if($variant == 'light', 1px, 0);
border-radius: $circular-radius; border-radius: $circular-radius;
outline: none; outline: none;
box-shadow: none; box-shadow: none;
background-color: white; background-color: white;
border: none; border: none;
color: transparent;
} }
&:focus slider, &:focus slider,