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

362 lines
10 KiB
SCSS
Raw Normal View History

2016-04-09 04:30:09 +00:00
@import "button";
/**********
! Notebook
***********/
@include exports("notebook") {
notebook {
2016-04-14 11:00:00 +00:00
&.frame {
border-color: border_normal($base_color);
&.top {
border-width: 1px 1px 0;
}
&.right {
border-width: 1px 1px 1px 0;
}
&.bottom {
border-width: 0 1px 1px;
}
&.left {
border-width: 1px 0 1px 1px;
}
}
2016-04-09 04:30:09 +00:00
> header {
padding: 0;
2016-04-09 04:30:09 +00:00
margin: 0;
border-width: 1px;
border-radius: 0;
border-color: $borders_color;
background-image: none;
background-clip: border-box;
2016-04-09 04:30:09 +00:00
background-color: shade($base_color, .9);
color: $text_color;
2016-04-09 04:30:09 +00:00
tabs { margin: -1px; }
&.top {
border-bottom-style: solid;
tabs {
margin-top: 0;
margin-left: 0;
margin-right: 0;
}
}
&.right {
border-left-style: solid;
tabs {
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
}
}
&.bottom {
border-top-style: solid;
tabs {
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
}
}
&.left {
border-right-style: solid;
tabs {
margin-left: 0;
margin-top: 0;
margin-bottom: 0;
}
}
2016-04-14 11:00:00 +00:00
&.top > tabs > arrow {
@extend %notebook_vert_arrows;
2016-04-09 04:30:09 +00:00
2016-04-14 11:00:00 +00:00
border-top-style: none;
}
2016-04-09 04:30:09 +00:00
2016-04-14 11:00:00 +00:00
&.bottom > tabs > arrow {
@extend %notebook_vert_arrows;
2016-04-09 04:30:09 +00:00
2016-04-14 11:00:00 +00:00
border-bottom-style: none;
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
@at-root %notebook_vert_arrows {
margin-left: 0;
margin-right: 0;
2016-04-14 11:00:00 +00:00
padding-left: 4px;
padding-right: 4px;
&.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 11:00:00 +00:00
&.left > tabs > arrow {
@extend %notebook_horz_arrows;
2016-04-09 04:30:09 +00:00
2016-04-14 11:00:00 +00:00
border-left-style: none;
}
&.right > tabs > arrow {
@extend %notebook_horz_arrows;
2016-04-09 04:30:09 +00:00
2016-04-14 11:00:00 +00:00
border-right-style: none;
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
@at-root %notebook_horz_arrows {
margin-top: 0;
margin-bottom: 0;
2016-04-14 11:00:00 +00:00
padding-top: 4px;
padding-bottom: 4px;
&.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
2016-04-14 11:00:00 +00:00
&.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
> tabs > arrow {
@extend %close_button;
min-height: 16px;
min-width: 16px;
&:hover:not(:active):not(:backdrop) {
background-clip: padding-box;
background-image: none;
2016-04-28 15:38:57 +00:00
background-color: transparentize($white, .7);
2016-04-14 11:00:00 +00:00
border-color: transparent;
box-shadow: none;
}
&:disabled { @extend %undecorated_button; }
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
tab {
padding: ($spacing + 1) 0 0; // top | left/right | bottom
border-style: solid;
border-width: 1px; // for reorderable tabs
border-color: transparent; //
2016-04-14 11:00:00 +00:00
background-image: none;
box-shadow: none;
outline: none;
button, button:hover {
padding: $spacing - 4;
margin-left: 15px;
min-height: 18px;
min-width: 18px;
opacity: 0;
transition: opacity .3s ease-in;
}
> box {
2016-04-14 11:00:00 +00:00
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
border-width: 2px;
border-style: solid;
border-color: transparent;
transition: border-color .3s ease-out;
2016-04-14 11:00:00 +00:00
}
&:hover {
background-color: shade($base_color, .93);
border-color: transparent;
outline: none;
2016-04-14 11:00:00 +00:00
button, button:hover {
opacity: 1;
}
}
&:checked {
background-color: mix($bg_color, $base_color, .4);
2016-04-14 11:00:00 +00:00
border-bottom-color: transparent;
outline: none;
label {
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
&:not(:first-child:only-child){
box-shadow: -1px 0 1px 0 rgba(0,0,0,0.1);
}
&:not(:last-child:only-child) {
box-shadow: 1px 0 1px 0 rgba(0,0,0,0.1);
}
2016-04-14 11:00:00 +00:00
}
label {
color: mix($text_color, $base_color, .3);
}
/* close button styling */
button {
@extend %close_button;
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
&.top tab {
padding: ($spacing + 1) 0 0; // top | left/right | bottom
border-style: solid;
border-color: $borders_color;
border-width: 0;
2016-04-14 11:00:00 +00:00
border-bottom-width: 1px;
transition: border-bottom-color .3s ease-out;
2016-04-09 04:30:09 +00:00
> box {
2016-04-14 11:00:00 +00:00
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
}
&:hover {
outline: none;
}
2016-04-14 11:00:00 +00:00
&:checked {
border-bottom-color: $selected_bg_color;
2016-04-14 11:00:00 +00:00
outline: none;
> box {
2016-04-14 11:00:00 +00:00
border-bottom-color: $selected_bg_color;
}
label {
margin-bottom: 0;
2016-04-14 11:00:00 +00:00
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
&.right tab {
padding: 0 ($spacing + 1) 0 0; // top | right | bottom | left
border-style: solid;
border-color: $borders_color;
border-width: 0;
2016-04-14 11:00:00 +00:00
border-left-width: 1px;
transition: border-left-color .3s ease-out;
2016-04-14 11:00:00 +00:00
> box {
2016-04-14 11:00:00 +00:00
padding: ($spacing + 1) ($spacing * 3); // top | right | bottom | left
}
&:hover {
outline: none;
}
2016-04-14 11:00:00 +00:00
&:checked {
border-left-color: $selected_bg_color;
2016-04-14 11:00:00 +00:00
outline: none;
> box {
2016-04-14 11:00:00 +00:00
border-left-color: $selected_bg_color;
}
label {
margin-left: 0;
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
2016-04-14 11:00:00 +00:00
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
&.bottom tab {
padding: 0 0 ($spacing + 1); // top | left/right | bottom
border-style: solid;
border-color: $borders_color;
border-width: 0;
2016-04-14 11:00:00 +00:00
border-top-width: 1px;
transition: border-top-color .3s ease-out;
2016-04-09 04:30:09 +00:00
> box {
2016-04-14 11:00:00 +00:00
padding: ($spacing + 1) ($spacing * 3) 0; // top/bottom | left/right
}
2016-04-09 04:30:09 +00:00
&:hover {
outline: none;
}
2016-04-14 11:00:00 +00:00
&:checked {
border-top-color: $selected_bg_color;
2016-04-14 11:00:00 +00:00
outline: none;
2016-04-09 04:30:09 +00:00
> box {
2016-04-14 11:00:00 +00:00
border-top-color: $selected_bg_color;
}
label {
margin-top: 0;
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
2016-04-14 11:00:00 +00:00
}
2016-04-09 04:30:09 +00:00
}
2016-04-14 11:00:00 +00:00
&.left tab {
padding: 0 0 0 ($spacing + 1); // top | right | bottom | left
border-style: solid;
border-color: $borders_color;
border-width: 0;
2016-04-14 11:00:00 +00:00
border-right-width: 1px;
transition: border-right-color .3s ease-out;
2016-04-14 11:00:00 +00:00
> box {
2016-04-14 11:00:00 +00:00
padding: ($spacing + 1) ($spacing * 3); // top/bottom | left/right
}
&:hover {
outline: none;
}
2016-04-14 11:00:00 +00:00
&:checked {
border-right-color: $selected_bg_color;
2016-04-14 11:00:00 +00:00
outline: none;
> box {
2016-04-14 11:00:00 +00:00
border-right-color: $selected_bg_color;
}
label {
margin-right: 0;
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
2016-04-14 11:00:00 +00:00
}
2016-04-09 04:30:09 +00:00
}
}
2016-04-14 11:00:00 +00:00
> stack:not(:only-child) {
2016-04-14 11:00:00 +00:00
background-color: $base_color;
&:backdrop { background-color: $backdrop_base_color; }
2016-04-14 11:00:00 +00:00
}
2016-04-09 04:30:09 +00:00
}
}