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

215 lines
5.9 KiB
SCSS
Raw Normal View History

2016-04-09 04:30:09 +00:00
/*********
! Sidebar
**********/
@include exports("sidebar") {
.sidebar {
border-style: none;
background-color: mix($bg_color, $base_color, .5);
@at-root %sidebar_left,
&:dir(ltr),
&.left,
&.left:dir(rtl) {
border-right: 1px solid $borders_color;
border-left-style: none;
2016-04-09 04:30:09 +00:00
}
@at-root %sidebar_right
&:dir(rtl),
&.right {
border-left: 1px solid $borders_color;
border-right-style: none;
}
2016-04-09 04:30:09 +00:00
&:backdrop {
background-color: $backdrop_sidebar_bg_color;
border-color: $backdrop_borders_color;
2016-04-13 06:01:02 +00:00
transition: 200ms ease-out;
}
.frame, frame { border-width: 0; }
list { background-color: transparent; }
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; } }
}
stacksidebar {
&.sidebar {
&:dir(ltr),
&.left,
&.left:dir(rtl) {
list { @extend %sidebar_left; }
2016-04-09 04:30:09 +00:00
}
&:dir(rtl),
&.right {
list { @extend %sidebar_right; }
2016-04-09 04:30:09 +00:00
}
}
row {
padding: $spacing * 2 $spacing;
2016-04-09 04:30:09 +00:00
> label {
padding-left: $spacing;
padding-right: $spacing;
}
&.needs-attention > label {
@extend %needs_attention;
2016-04-12 06:48:04 +00:00
background-size: 6px 6px, 0 0;
}
2016-04-09 04:30:09 +00:00
}
}
2016-04-09 04:30:09 +00:00
$_placesidebar_icons_opacity: 0.7;
placessidebar {
> viewport.frame { border-style: none; }
row {
// Needs overriding of the GtkListBoxRow padding
min-height: 36px;
padding: 0px;
// Using margins/padding directly in the SidebarRow
// will make the animation of the new bookmark row jump
> revealer { padding: 0 14px; }
&:selected { color: $selected_fg_color; }
&:disabled { color: $insensitive_fg_color; }
2016-04-09 04:30:09 +00:00
&:backdrop {
color: $backdrop_fg_color;
2016-04-09 04:30:09 +00:00
&:selected { color: $backdrop_selected_fg_color; }
2016-04-09 04:30:09 +00:00
&:disabled { color: $backdrop_insensitive_color; }
}
image.sidebar-icon {
opacity: $_placesidebar_icons_opacity; // dim the device icons
&:dir(ltr) { padding-right: 8px; }
&:dir(rtl) { padding-left: 8px; }
}
2016-04-09 04:30:09 +00:00
label.sidebar-label {
&:dir(ltr) { padding-right: 2px; }
&:dir(rtl) { padding-left: 2px; }
2016-04-09 04:30:09 +00:00
}
@at-root button.sidebar-button {
//@extend %button_basic.flat;
//@extend %button_selected.flat;
min-height: 26px;
min-width: 26px;
margin-top: 3px;
margin-bottom: 3px;
padding: 0;
border-radius: 100%;
-gtk-outline-radius: 100%;
2016-04-09 04:30:09 +00:00
&:not(:hover):not(:active),
&:backdrop {
> image { opacity: $_placesidebar_icons_opacity; }
}
}
// in the sidebar case it makes no sense to click the selected row
&:selected:active { box-shadow: none; }
&.sidebar-placeholder-row {
padding: 0 8px;
min-height: 2px;
background-image: image($drop_target_color);
background-clip: content-box;
}
&.sidebar-new-bookmark-row { color: $selected_bg_color; }
&:drop(active):not(:disabled) {
color: $drop_target_color;
box-shadow: inset 0 1px $drop_target_color,
inset 0 -1px $drop_target_color;
&:selected {
color: $selected_fg_color;
background-color: $drop_target_color;
}
}
2016-04-09 04:30:09 +00:00
}
}
}
/******
! Paned
*******/
@include exports("paned") {
paned {
> separator {
min-width: 1px;
min-height: 1px;
-gtk-icon-source: none; // defeats the ugly default handle decoration
border-style: none; // just to be sure
background-color: transparent;
// workaround, using background istead of a border since the border will get rendered twice (?)
background-image: image(shade($bg_color, .9));
background-size: 1px 1px;
background-position: center center;
&:selected { background-image: image($selected_bg_color); } // FIXME is this needed?
&:backdrop { background-image: image($backdrop_borders_color); }
&.wide {
min-width: 5px;
min-height: 5px;
background-color: $bg_color;
background-image: image(border_normal($bg_color)), image(border_normal($bg_color));
background-size: 1px 1px, 1px 1px;
&:backdrop {
background-color: $backdrop_bg_color;
background-image: image($backdrop_borders_color),
image($backdrop_borders_color);
}
}
}
2016-04-09 04:30:09 +00:00
&.horizontal > separator {
background-repeat: repeat-y;
padding: 0 2px;
margin: 0 -2px;
2016-04-09 04:30:09 +00:00
&.wide {
margin: 0;
padding: 0;
background-repeat: repeat-y, repeat-y;
background-position: left, right;
}
}
2016-04-09 04:30:09 +00:00
&.vertical > separator {
background-repeat: repeat-x;
padding: 2px 0;
margin: -2px 0;
&.wide {
margin: 0;
padding: 0;
background-repeat: repeat-x, repeat-x;
background-position: bottom, top;
}
}
2016-04-09 04:30:09 +00:00
}
}