Skip to content

Commit

Permalink
Fix notebook 2px border (Issue #184)
Browse files Browse the repository at this point in the history
  • Loading branch information
casta authored and ochosi committed Jun 12, 2017
1 parent fa43961 commit b587573
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 103 deletions.
74 changes: 41 additions & 33 deletions gtk-3.0/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2044,58 +2044,46 @@ notebook {

&.top {
> stack { border-top-style: none; }
> tabs {
margin-bottom: -2px;
> tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade($bg_color, 0.9);
> tabs > tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade($bg_color, 0.9);

&:backdrop { box-shadow: none; }
&:backdrop { box-shadow: none; }

&:checked { border-width: 1px 1px 0 1px; }
}
&:checked { border-width: 1px 1px 0 1px; }
}
}

&.bottom {
> stack { border-bottom-style: none; }
> tabs {
margin-top: -2px;
> tab {
border-radius: 0 0 3px 3px;
> tabs > tab {
border-radius: 0 0 3px 3px;

&:backdrop { box-shadow: none; }
&:backdrop { box-shadow: none; }

&:checked { border-width: 0 1px 1px 1px; }
}
&:checked { border-width: 0 1px 1px 1px; }
}
}

&.left {
> stack { border-left-style: none; }
> tabs {
margin-right: -2px;
> tab {
border-radius: 3px 0 0 3px;
> tabs > tab {
border-radius: 3px 0 0 3px;

&:backdrop { box-shadow: none; }
&:backdrop { box-shadow: none; }

&:checked { border-width: 1px 0 1px 1px; }
}
&:checked { border-width: 1px 0 1px 1px; }
}
}

&.right {
> stack { border-right-style: none; }
> tabs {
margin-left: -2px;
> tab {
border-radius: 0 3px 3px 0;
> tabs > tab {
border-radius: 0 3px 3px 0;

&:backdrop { box-shadow: none; }
&:backdrop { box-shadow: none; }

&:checked { border-width: 1px 1px 1px 0; }
}
&:checked { border-width: 1px 1px 1px 0; }
}
}

Expand Down Expand Up @@ -2287,11 +2275,31 @@ notebook {
&.bottom tab { padding-top: 4px; }
}

> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
background-color: shade($bg_color, 1.05);
border: 1px solid shade($bg_color, 0.9);
&.frame {
> header {
&.top > tabs {
margin-bottom: -2px;
}

&.bottom > tabs {
margin-top: -2px;
}

&.left > tabs {
margin-right: -2px;
}

&:backdrop { background-color: $backdrop_bg_color; }
&.right > tabs {
margin-left: -2px;
}
}

> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
background-color: shade($bg_color, 1.05);
border: 1px solid shade($bg_color, 0.9);

&:backdrop { background-color: $backdrop_bg_color; }
}
}
}

Expand Down
70 changes: 35 additions & 35 deletions gtk-3.0/gtk-contained-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2285,45 +2285,37 @@ notebook > header {
margin: -1px; }
notebook > header.top > stack {
border-top-style: none; }
notebook > header.top > tabs {
margin-bottom: -2px; }
notebook > header.top > tabs > tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade(#393f3f, 0.9); }
notebook > header.top > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.top > tabs > tab:checked {
border-width: 1px 1px 0 1px; }
notebook > header.top > tabs > tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade(#393f3f, 0.9); }
notebook > header.top > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.top > tabs > tab:checked {
border-width: 1px 1px 0 1px; }
notebook > header.bottom > stack {
border-bottom-style: none; }
notebook > header.bottom > tabs {
margin-top: -2px; }
notebook > header.bottom > tabs > tab {
border-radius: 0 0 3px 3px; }
notebook > header.bottom > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.bottom > tabs > tab:checked {
border-width: 0 1px 1px 1px; }
notebook > header.bottom > tabs > tab {
border-radius: 0 0 3px 3px; }
notebook > header.bottom > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.bottom > tabs > tab:checked {
border-width: 0 1px 1px 1px; }
notebook > header.left > stack {
border-left-style: none; }
notebook > header.left > tabs {
margin-right: -2px; }
notebook > header.left > tabs > tab {
border-radius: 3px 0 0 3px; }
notebook > header.left > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.left > tabs > tab:checked {
border-width: 1px 0 1px 1px; }
notebook > header.left > tabs > tab {
border-radius: 3px 0 0 3px; }
notebook > header.left > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.left > tabs > tab:checked {
border-width: 1px 0 1px 1px; }
notebook > header.right > stack {
border-right-style: none; }
notebook > header.right > tabs {
margin-left: -2px; }
notebook > header.right > tabs > tab {
border-radius: 0 3px 3px 0; }
notebook > header.right > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.right > tabs > tab:checked {
border-width: 1px 1px 1px 0; }
notebook > header.right > tabs > tab {
border-radius: 0 3px 3px 0; }
notebook > header.right > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.right > tabs > tab:checked {
border-width: 1px 1px 1px 0; }
notebook > header.top > tabs > arrow {
border-top-style: none; }
notebook > header.bottom > tabs > arrow {
Expand Down Expand Up @@ -2446,10 +2438,18 @@ notebook > header {
padding-bottom: 4px; }
notebook > header.bottom tab {
padding-top: 4px; }
notebook > stack:not(:only-child) {
notebook.frame > header.top > tabs {
margin-bottom: -2px; }
notebook.frame > header.bottom > tabs {
margin-top: -2px; }
notebook.frame > header.left > tabs {
margin-right: -2px; }
notebook.frame > header.right > tabs {
margin-left: -2px; }
notebook.frame > stack:not(:only-child) {
background-color: shade(#393f3f, 1.05);
border: 1px solid shade(#393f3f, 0.9); }
notebook > stack:not(:only-child):backdrop {
notebook.frame > stack:not(:only-child):backdrop {
background-color: #393f3f; }

/**************
Expand Down
70 changes: 35 additions & 35 deletions gtk-3.0/gtk-contained.css
Original file line number Diff line number Diff line change
Expand Up @@ -2298,45 +2298,37 @@ notebook > header {
margin: -1px; }
notebook > header.top > stack {
border-top-style: none; }
notebook > header.top > tabs {
margin-bottom: -2px; }
notebook > header.top > tabs > tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade(#cecece, 0.9); }
notebook > header.top > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.top > tabs > tab:checked {
border-width: 1px 1px 0 1px; }
notebook > header.top > tabs > tab {
border-radius: 3px 3px 0 0;
border: 1px solid shade(#cecece, 0.9); }
notebook > header.top > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.top > tabs > tab:checked {
border-width: 1px 1px 0 1px; }
notebook > header.bottom > stack {
border-bottom-style: none; }
notebook > header.bottom > tabs {
margin-top: -2px; }
notebook > header.bottom > tabs > tab {
border-radius: 0 0 3px 3px; }
notebook > header.bottom > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.bottom > tabs > tab:checked {
border-width: 0 1px 1px 1px; }
notebook > header.bottom > tabs > tab {
border-radius: 0 0 3px 3px; }
notebook > header.bottom > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.bottom > tabs > tab:checked {
border-width: 0 1px 1px 1px; }
notebook > header.left > stack {
border-left-style: none; }
notebook > header.left > tabs {
margin-right: -2px; }
notebook > header.left > tabs > tab {
border-radius: 3px 0 0 3px; }
notebook > header.left > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.left > tabs > tab:checked {
border-width: 1px 0 1px 1px; }
notebook > header.left > tabs > tab {
border-radius: 3px 0 0 3px; }
notebook > header.left > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.left > tabs > tab:checked {
border-width: 1px 0 1px 1px; }
notebook > header.right > stack {
border-right-style: none; }
notebook > header.right > tabs {
margin-left: -2px; }
notebook > header.right > tabs > tab {
border-radius: 0 3px 3px 0; }
notebook > header.right > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.right > tabs > tab:checked {
border-width: 1px 1px 1px 0; }
notebook > header.right > tabs > tab {
border-radius: 0 3px 3px 0; }
notebook > header.right > tabs > tab:backdrop {
box-shadow: none; }
notebook > header.right > tabs > tab:checked {
border-width: 1px 1px 1px 0; }
notebook > header.top > tabs > arrow {
border-top-style: none; }
notebook > header.bottom > tabs > arrow {
Expand Down Expand Up @@ -2459,10 +2451,18 @@ notebook > header {
padding-bottom: 4px; }
notebook > header.bottom tab {
padding-top: 4px; }
notebook > stack:not(:only-child) {
notebook.frame > header.top > tabs {
margin-bottom: -2px; }
notebook.frame > header.bottom > tabs {
margin-top: -2px; }
notebook.frame > header.left > tabs {
margin-right: -2px; }
notebook.frame > header.right > tabs {
margin-left: -2px; }
notebook.frame > stack:not(:only-child) {
background-color: shade(#cecece, 1.05);
border: 1px solid shade(#cecece, 0.9); }
notebook > stack:not(:only-child):backdrop {
notebook.frame > stack:not(:only-child):backdrop {
background-color: #cecece; }

/**************
Expand Down

0 comments on commit b587573

Please sign in to comment.