mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 20:51:07 +00:00
Adwaita: add a transition to the switch slider
This commit is contained in:
parent
6598dca783
commit
eacd632e5e
@ -5,6 +5,7 @@
|
||||
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||
$asset_suffix: if($variant=='dark', '-dark', '');
|
||||
$backdrop_transition: 200ms ease-out;
|
||||
$button_transition: all 200ms $ease-out-quad;
|
||||
|
||||
* {
|
||||
padding: 0;
|
||||
@ -437,14 +438,13 @@ $_dot_color: if($variant=='light', $selected_bg_color,
|
||||
|
||||
button {
|
||||
@at-root %button_basic, & {
|
||||
$_button_transition: all 200ms $ease-out-quad;
|
||||
|
||||
min-height: 24px;
|
||||
min-width: 16px;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid;
|
||||
border-radius: 3px;
|
||||
transition: $_button_transition;
|
||||
transition: $button_transition;
|
||||
|
||||
@include button(normal);
|
||||
|
||||
@ -457,10 +457,10 @@ button {
|
||||
transition: none;
|
||||
|
||||
&:hover {
|
||||
transition: $_button_transition;
|
||||
transition: $button_transition;
|
||||
transition-duration: 500ms;
|
||||
|
||||
&:active { transition: $_button_transition; }
|
||||
&:active { transition: $button_transition; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -2459,6 +2459,8 @@ switch {
|
||||
min-height: 27px;
|
||||
border: 1px solid;
|
||||
border-radius: 3px;
|
||||
transition: $button_transition;
|
||||
|
||||
@include button(normal-alt, $edge: $shadow_color);
|
||||
}
|
||||
|
||||
@ -2469,7 +2471,11 @@ switch {
|
||||
&:disabled slider { @include button(insensitive); }
|
||||
|
||||
&:backdrop {
|
||||
slider { @include button(backdrop); }
|
||||
slider {
|
||||
transition: $backdrop_transition;
|
||||
|
||||
@include button(backdrop);
|
||||
}
|
||||
|
||||
&:active slider { border-color: if($variant == 'light', $selected_bg_color, $selected_borders_color); }
|
||||
|
||||
|
@ -2444,6 +2444,7 @@ switch {
|
||||
min-height: 27px;
|
||||
border: 1px solid;
|
||||
border-radius: 3px;
|
||||
transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||
color: #eeeeec;
|
||||
outline-color: rgba(238, 238, 236, 0.3);
|
||||
border-color: #1c1f1f;
|
||||
@ -2468,6 +2469,7 @@ switch {
|
||||
switch:disabled slider label, switch:disabled slider {
|
||||
color: #949796; }
|
||||
switch:backdrop slider {
|
||||
transition: 200ms ease-out;
|
||||
border-color: #1f2222;
|
||||
background-image: linear-gradient(to bottom, #393f3f);
|
||||
text-shadow: none;
|
||||
|
@ -2457,6 +2457,7 @@ switch {
|
||||
min-height: 27px;
|
||||
border: 1px solid;
|
||||
border-radius: 3px;
|
||||
transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||
color: #2e3436;
|
||||
outline-color: rgba(46, 52, 54, 0.3);
|
||||
border-color: #9d9d99;
|
||||
@ -2481,6 +2482,7 @@ switch {
|
||||
switch:disabled slider label, switch:disabled slider {
|
||||
color: #8b8e8f; }
|
||||
switch:backdrop slider {
|
||||
transition: 200ms ease-out;
|
||||
border-color: #a5a5a1;
|
||||
background-image: linear-gradient(to bottom, #e8e8e7);
|
||||
text-shadow: none;
|
||||
|
Loading…
Reference in New Issue
Block a user