numix-gtk-theme/gtk-3.20/scss/widgets/_scrollbar.scss

159 lines
4.4 KiB
SCSS
Raw Normal View History

2016-04-09 04:30:09 +00:00
/***********
! Scrollbar
************/
@include exports("scrollbar") {
scrollbar {
2016-04-19 16:29:47 +00:00
$_slider_min_length: 40px;
2016-04-09 04:30:09 +00:00
// disable steppers
@at-root * {
-GtkScrollbar-has-backward-stepper: false;
-GtkScrollbar-has-forward-stepper: false;
}
background-color: $scrollbar_bg_color;
transition: 300ms ease-out;
// scrollbar border
&.top { border-bottom: 1px solid $borders_color; }
&.bottom { border-top: 1px solid $borders_color; }
&.left { border-right: 1px solid $borders_color; }
&.right { border-left: 1px solid $borders_color; }
&:backdrop {
background-color: $backdrop_scrollbar_bg_color;
border-color: $backdrop_borders_color;
transition: 400ms ease-in;
}
// slider
slider {
min-width: 7px;
min-height: 7px;
2016-04-19 16:29:47 +00:00
margin: 0;
border: 1px solid transparent;
border-radius: $roundness;
2016-04-09 04:30:09 +00:00
background-clip: padding-box;
background-color: $scrollbar_slider_color;
&:hover { background-color: $scrollbar_slider_hover_color; }
&:hover:active { background-color: $scrollbar_slider_active_color; }
&:backdrop { background-color: $backdrop_scrollbar_slider_color; }
&:disabled { background-color: transparent; }
}
&.fine-tune {
slider {
min-width: 7px;
min-height: 7px;
}
2016-04-19 16:32:41 +00:00
&.horizontal slider { border-width: 1px; }
2016-04-19 16:29:47 +00:00
2016-04-19 16:32:41 +00:00
&.vertical slider { border-width: 1px; }
2016-04-09 04:30:09 +00:00
}
&.overlay-indicator {
&:not(.dragging):not(.hovering) {
border-color: transparent;
2016-04-19 16:29:47 +00:00
opacity: .4;
2016-04-09 04:30:09 +00:00
background-color: transparent;
slider {
margin: 0;
2016-04-18 12:58:29 +00:00
min-width: 4px;
min-height: 4px;
2016-04-09 04:30:09 +00:00
background-color: $fg_color;
border: 1px solid if($variant == 'light', white, black);
}
button {
2016-04-18 12:58:29 +00:00
min-width: 4px;
min-height: 4px;
2016-04-09 04:30:09 +00:00
background-color: $fg_color;
background-clip: padding-box;
border-radius: $roundness;
2016-04-09 04:30:09 +00:00
border: 1px solid if($variant == 'light', white, black);
-gtk-icon-source: none;
}
&.horizontal {
slider {
2016-04-18 12:58:29 +00:00
margin: 0;
2016-04-09 04:30:09 +00:00
min-width: $_slider_min_length;
}
button {
margin: 1px 2px;
min-width: 5px;
}
}
&.vertical {
slider {
2016-04-18 12:58:29 +00:00
margin: 0;
2016-04-09 04:30:09 +00:00
min-height: $_slider_min_length;
}
button {
margin: 2px 1px;
min-height: 5px;
}
}
}
&.dragging,
2016-04-19 16:29:47 +00:00
&.hovering { opacity: .8; }
2016-04-09 04:30:09 +00:00
}
&.horizontal slider { min-width: $_slider_min_length; }
&.vertical slider { min-height: $_slider_min_length; }
2016-04-19 16:29:47 +00:00
2016-04-09 04:30:09 +00:00
// button styling
button {
padding: 0;
min-width: 7px;
min-height: 7px;
border-style: none;
border-radius: $roundness;
2016-04-09 04:30:09 +00:00
transition-property: min-height, min-width, color;
color: $scrollbar_slider_color;
&:hover {
color: $scrollbar_slider_hover_color;
}
&:active, &:checked {
color: $scrollbar_slider_active_color;
}
&:backdrop {
color: $backdrop_scrollbar_slider_color;
}
}
// button icons
&.vertical {
button {
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
}
}
&.horizontal {
button {
&.down { -gtk-icon-source: -gtk-icontheme('pan-right-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-left-symbolic'); }
}
}
}
}