tweaked toggle switch. still not done with it.

pull/327/head
Dustin Falgout 2016-04-12 02:56:03 -05:00
parent 82c6761359
commit 5616f7308c
2 changed files with 21 additions and 13 deletions

View File

@ -36,6 +36,14 @@ $scrollbar_slider_color: shade($bg_color, .5);
$scrollbar_slider_hover_color: shade($bg_color, .3); $scrollbar_slider_hover_color: shade($bg_color, .3);
$scrollbar_slider_active_color: if($variant == 'light', darken($selected_bg_color, 5%), lighten($selected_bg_color, 10%)); $scrollbar_slider_active_color: if($variant == 'light', darken($selected_bg_color, 5%), lighten($selected_bg_color, 10%));
$switch_disabled_bg_color: #d8d8d8;
$switch_disabled_border_color: #ccc;
$switch_disabled_fg_color: mix(#444, #f0f0f0, 0.5);
$switch_disabled_slider_bg_color: #e8eaec;
$switch_bg_color: #fbfbfb;
$switch_fg_color: #8e969e;
$switch_slider_bg_color: #fbfbfb;
// misc colors used by gtk+ // misc colors used by gtk+
$info_fg_color: #fff; $info_fg_color: #fff;
$info_bg_color: #03a9f4; $info_bg_color: #03a9f4;

View File

@ -73,43 +73,43 @@ $suffix: if($variant == "dark", "-dark", "");
@include exports("switch") { @include exports("switch") {
switch { switch {
border-radius: 3px; border-radius: $roundness;
padding: 5px; padding: $spacing;
border: none; border: none;
outline: none; outline: none;
transition: all 0.4s linear; transition: all 0.4s linear;
transition: background-colot 0.4s linear; transition: background-color 0.3s linear;
min-width: 93px; min-width: 93px;
min-height: 25px; min-height: 25px;
background-color: $base_color; background-color: $switch_bg_color;
color: $text_color; color: $switch_fg_color;
slider { slider {
background-color: mix($text_color, $bg_color, .5); background-color: $switch_slider_bg_color;
transition: all 0.3s linear; transition: all 0.3s linear;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
border-radius: 2px; border-radius: $roundness;
} }
&:checked { &:checked {
background-color: $selected_bg_color; background-color: $selected_bg_color;
background-image: none; background-image: none;
border-color: $selected_bg_color; border-color: $selected_bg_color;
color: $selected_fg_color; color: $base_color;
slider { slider {
background-color: $selected_fg_color; background-color: $white;
} }
} }
&:disabled { &:disabled {
background-color: mix($bg_color, $base_color, .5); background-color: $switch_disabled_bg_color;
background-image: none; background-image: none;
/*border-color: #ccc;*/ border-color: $switch_disabled_border_color;
color: mix($text_color, $bg_color, .5); color: $switch_disabled_fg_color;
slider { slider {
background-color: $bg_color; background-color: $switch_disabled_slider_bg_color;
} }
} }
} }