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

284 lines
8.0 KiB
SCSS
Raw Normal View History

2016-04-09 04:30:09 +00:00
@import "button";
/**********
! Notebook
***********/
@include exports("notebook") {
notebook {
> header {
2016-04-14 08:40:15 +00:00
padding: 1px;
border-color: $borders_color;
border-width: 1px;
2016-04-09 04:30:09 +00:00
background-color: shade($base_color, .9);
2016-04-14 08:40:15 +00:00
&:backdrop {
border-color: $backdrop_borders_color;
background-color: shade($backdrop_base_color, .9);
}
tabs { margin: -1px; }
&.top {
border-bottom-style: solid;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
> tabs {
margin-bottom: -2px;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
> tab {
&:hover { box-shadow: inset 0 -3px $borders_color; }
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&:backdrop { box-shadow: none; }
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&:checked { box-shadow: inset 0 -3px $selected_bg_color; }
}
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.bottom {
border-top-style: solid;
> tabs {
margin-top: -2px;
> tab {
&:hover { box-shadow: inset 0 3px $borders_color; }
&:backdrop { box-shadow: none; }
&:checked { box-shadow: inset 0 3px $selected_bg_color; }
}
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.left {
border-right-style: solid;
> tabs {
margin-right: -2px;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
> tab {
&:hover { box-shadow: inset -3px 0 $borders_color; }
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&:backdrop { box-shadow: none; }
&:checked { box-shadow: inset -3px 0 $selected_bg_color; }
}
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.right {
border-left-style: solid;
> tabs {
margin-left: -2px;
> tab {
&:hover { box-shadow: inset 3px 0 $borders_color; }
2016-04-14 08:40:15 +00:00
&:backdrop { box-shadow: none; }
&:checked { box-shadow: inset 3px 0 $selected_bg_color; }
}
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.top > tabs > arrow {
@extend %notebook_vert_arrows;
border-top-style: none;
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.bottom > tabs > arrow {
@extend %notebook_vert_arrows;
border-bottom-style: none;
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
@at-root %notebook_vert_arrows {
margin-left: 0;
margin-right: 0;
padding-left: 4px;
padding-right: 4px;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&.down { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.left > tabs > arrow {
@extend %notebook_horz_arrows;
border-left-style: none;
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
&.right > tabs > arrow {
@extend %notebook_horz_arrows;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
border-right-style: none;
}
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
@at-root %notebook_horz_arrows {
margin-top: 0;
margin-bottom: 0;
padding-top: 4px;
padding-bottom: 4px;
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
2016-04-09 04:30:09 +00:00
2016-04-14 08:40:15 +00:00
&.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
> tabs > arrow {
//@extend %button_basic;
//@extend %button_basic.flat;
min-height: 16px;
min-width: 16px;
border-radius: 0;
&:hover:not(:active):not(:backdrop) {
background-clip: padding-box;
background-image: none;
background-color: transparentize(white, .7);
border-color: transparent;
box-shadow: none;
}
//&:disabled { @include button(undecorated); }
2016-04-09 04:30:09 +00:00
}
2016-04-14 08:40:15 +00:00
tab {
min-height: 30px;
min-width: 30px;
padding: $spacing $spacing * 2;
outline-offset: -5px;
color: $insensitive_fg_color;
border-width: 1px; // for reorderable tabs
border-color: transparent; //
&:hover {
color: mix($insensitive_fg_color, $fg_color, .5);
&.reorderable-page {
border-color: transparentize($borders_color, .7);
background-color: transparentize($base_color, .8);
}
}
&:backdrop {
color: mix($backdrop_fg_color, $backdrop_bg_color, .6);
&.reorderable-page {
border-color: transparent;
background-color: transparent;
}
}
&:checked {
color: $fg_color;
&.reorderable-page {
border-color: transparentize($borders_color, .4);
background-color: transparentize($base_color, .5);
&:hover { background-color: transparentize($base_color, .3); }
}
}
&:backdrop:checked {
color: $backdrop_fg_color;
&.reorderable-page {
border-color: $backdrop_borders_color;
background-color: $backdrop_base_color;
}
}
// colors the button like the label, overridden otherwise
button.flat {
&:hover { color: currentColor; }
&, &:backdrop { color: gtkalpha(currentColor, .3); }
padding: 0;
margin-top: 4px;
margin-bottom: 4px;
// FIXME: generalize .small-button?
min-width: 20px;
min-height: 20px;
&:last-child {
margin-left: 4px;
margin-right: -4px;
}
&:first-child {
margin-left: -4px;
margin-right: 4px;
}
}
}
&.top,
&.bottom {
tabs {
padding-left: 0;
padding-right: 0;
&:not(:only-child) {
margin-left: 3px;
margin-right: 3px;
&:first-child { margin-left: -1px; }
&:last-child { margin-right: -1px; }
}
tab {
margin-left: 0;
margin-right: 0;
&.reorderable-page { border-style: none solid; }
}
}
}
&.left,
&.right {
tabs {
padding-top: 0;
padding-bottom: 0;
&:not(:only-child) {
margin-top: 3px;
margin-bottom: 3px;
&:first-child { margin-top: -1px; }
&:last-child { margin-bottom: -1px; }
}
tab {
margin-top: 0;
margin-bottom: 0;
&.reorderable-page { border-style: solid none; }
}
}
}
&.top tab { padding-bottom: 4px; }
&.bottom tab { padding-top: 4px; }
}
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
background-color: $base_color;
&:backdrop { background-color: $backdrop_base_color; }
2016-04-09 04:30:09 +00:00
}
}
}