notebook tabs redesign

pull/344/head
Dustin Falgout 2016-04-14 06:00:00 -05:00
parent a86f0a339c
commit d15039c50e
1 changed files with 237 additions and 89 deletions

View File

@ -6,8 +6,27 @@
***********/
@include exports("notebook") {
notebook {
&.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;
}
}
> header {
padding: 0;
margin: 0;
@ -18,20 +37,226 @@
background-color: shade($base_color, .9);
color: $text_color;
&.frame {
border-color: border_normal($base_color);
&.top > tabs > arrow {
@extend %notebook_vert_arrows;
&.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; }
border-top-style: none;
}
tabs arrow {
margin: 5px;
&.bottom > tabs > arrow {
@extend %notebook_vert_arrows;
border-bottom-style: none;
}
@at-root %notebook_vert_arrows {
margin-left: -5px;
margin-right: -5px;
padding-left: 4px;
padding-right: 4px;
&.down { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
}
&.left > tabs > arrow {
@extend %notebook_horz_arrows;
border-left-style: none;
}
&.right > tabs > arrow {
@extend %notebook_horz_arrows;
border-right-style: none;
}
@at-root %notebook_horz_arrows {
margin-top: -5px;
margin-bottom: -5px;
padding-top: 4px;
padding-bottom: 4px;
&.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
}
> tabs > arrow {
@extend %close_button;
min-height: 16px;
min-width: 16px;
&:hover:not(:active):not(:backdrop) {
background-clip: padding-box;
background-image: none;
background-color: transparentize(white, 0.7);
border-color: transparent;
box-shadow: none;
}
&:disabled { @extend %undecorated_button; }
}
tab {
padding: ($spacing + 1) 0 0; // top | left/right | bottom
border-style: solid;
border-color: shade($bg_color, .8);
border-width: 0px;
background-color: mix($bg_color, $base_color, .6);
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, > label {
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
border-width: 2px;
border-style: solid;
border-color: transparent;
transition: border-bottom-color .3s ease-out;
}
&:hover {
background-color: shade($base_color, .93);
button, button:hover {
opacity: 1;
}
&:checked {
background-color: mix($bg_color, $base_color, .6);
}
}
&:checked {
border-bottom-color: transparent;
outline: none;
label {
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
}
label {
color: mix($text_color, $base_color, .3);
}
/* close button styling */
button {
@extend %close_button;
}
}
&.top tab {
padding: ($spacing + 1) 0 0; // top | left/right | bottom
border-style: solid;
border-color: shade($bg_color, .8);
border-width: 0px;
border-bottom-width: 1px;
> box, > label {
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
}
&:checked {
border-bottom-color: transparent;
outline: none;
> box, > label {
border-bottom-color: $selected_bg_color;
}
label {
margin-bottom: -1px;
color: $selected_bg_color;
}
&:hover {
background-color: mix($bg_color, $base_color, .6);
}
}
}
&.right tab {
padding: 0 ($spacing + 1) 0 0; // top | right | bottom | left
border-style: solid;
border-color: shade($bg_color, .8);
border-width: 0px;
border-left-width: 1px;
> box, > label {
padding: ($spacing + 1) ($spacing * 3); // top | right | bottom | left
}
&:checked {
border-left-color: transparent;
outline: none;
> box, > label {
margin-left: -1px;
border-left-color: $selected_bg_color;
}
}
}
&.bottom tab {
padding: 0 0 ($spacing + 1); // top | left/right | bottom
border-style: solid;
border-color: shade($bg_color, .8);
border-width: 0px;
border-top-width: 1px;
> box, > label {
padding: ($spacing + 1) ($spacing * 3) 0; // top/bottom | left/right
}
&:checked {
border-top-color: transparent;
outline: none;
> box, > label {
margin-top: -1px;
border-top-color: $selected_bg_color;
}
}
}
&.left tab {
padding: 0 0 0 ($spacing + 1); // top | right | bottom | left
border-style: solid;
border-color: shade($bg_color, .8);
border-width: 0px;
border-right-width: 1px;
> box, > label {
padding: ($spacing + 1) ($spacing * 3); // top/bottom | left/right
}
&:checked {
border-right-color: transparent;
outline: none;
> box, > label {
margin-right: -1px;
border-right-color: $selected_bg_color;
}
}
}
}
@ -40,82 +265,5 @@
background-color: $base_color;
color: $text_color;
}
tab {
padding: ($spacing + 1) ($spacing * 2);
border: 1px solid transparent;
background-color: transparent;
background-image: none;
&:hover {
background-color: shade($base_color, .95);
border-color: shade($base_color, .8);
}
&:checked {
background-color: $base_color;
background-image: none;
border-color: shade($base_color, .85);
label { color: $text_color; }
}
&.top {
border-bottom-width: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
&.right {
border-left-width: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
&.bottom {
border-top-width: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
&.left {
border-right-width: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
label { color: mix($text_color, $base_color, .3); }
/* close button styling */
button { @extend %close_button; }
}
.prelight-page {
&, label { color: mix($text_color, $base_color, .15); }
}
.active-page {
&, label { color: $text_color; }
}
.reorderable-page {
&:hover {
background-color: shade($base_color, .85);
border-left: 0;
border-right: 0;
/* using box shadows instead of borders due to slanted edges */
box-shadow: inset 0 3px alpha($black, .03), inset 0 2px alpha($black, .03), inset 0 1px alpha($black, .03),
inset 1px 0 shade($base_color, .7), inset -1px 0 shade($base_color, .7);
}
&:checked {
background-color: shade($base_color, .9);
border-left: 0;
border-right: 0;
box-shadow: inset 0 3px alpha($black, .03), inset 0 2px alpha($black, .03), inset 0 1px alpha($black, .03),
inset 1px 0 shade($base_color, .75), inset -1px 0 shade($base_color, .75);
}
}
}
}