From b1869d2df0c789ecfa551c614a2566cbbc1921e0 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 5 Nov 2013 18:25:27 -0500 Subject: [PATCH 1/8] dark chrome tabs --- stylesheets/panels.less | 1 - stylesheets/tabs.less | 156 ++++++++++++++++++++++------------ stylesheets/ui-variables.less | 2 +- 3 files changed, 102 insertions(+), 57 deletions(-) diff --git a/stylesheets/panels.less b/stylesheets/panels.less index a8ceebf..d5c5743 100644 --- a/stylesheets/panels.less +++ b/stylesheets/panels.less @@ -39,7 +39,6 @@ .is-blurred { .tool-panel, .inset-panel { - opacity: 0.6; } } diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index e2f9e16..7eafeea 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -1,65 +1,111 @@ @import "ui-variables"; -@import "ui-mixins"; +@tab-radius: 3px; +@modified-icon-width: 8px; +@tab-skew: 30deg; +@tab-top-padding: 5px; +@tab-bottom-border-height: 5px; +@tab-border: 1px solid @tab-border-color; .tab-bar { - height: @tab-height + 6px; - border-bottom: 4px solid @tab-bar-border-color; - box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 rgba(0, 0, 0, 0.5); - margin-bottom: 1px; - background-color: @tab-bar-background-color; -} + height: @tab-height + @tab-top-padding + 5px; + background-image: -webkit-linear-gradient(top, @tab-bar-background-color, lighten(@tab-bar-background-color, 9%)); + box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15); + padding: 0 10px; -.tab { - height: @tab-height; - line-height: @tab-height; - color: @text-color; - margin: 0; - background-image: -webkit-linear-gradient(@tab-background-color, darken(@tab-background-color, 10%)); - box-shadow: - inset 0 2px 0 rgba(255, 255, 255, 0.1), - inset 0 1px 0 rgba(0, 0, 0, 1), - inset 1px 0 0 @background-color-highlight, - inset -1px 0 0 @background-color-highlight; -} - -.tab:hover { - color: @text-color-highlight; -} - -.tab.active { - height: @tab-height + 1px; - background-image: -webkit-linear-gradient(@tab-background-color-active, @tab-bar-border-color); - color: @text-color-highlight; - text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); - z-index: 2; - box-shadow: - inset 0 1px 0 rgba(0, 0, 0, 0.5), - inset 0 2px 0 rgba(255, 255, 255, 0.1), - inset 1px 0 0 rgba(255, 255, 255, 0.1), - inset -1px 0 0 rgba(255, 255, 255, 0.1) -} - -.tab.active:hover .close-icon { - color: @text-color-highlight; -} - -// Bootstrap nav tabs. -.nav.nav-tabs { - border-bottom-color: @tab-background-color-active; - - > li { - margin-bottom: 0; + &:after { + content: ""; + position: absolute; + bottom: 0; + height: @tab-bottom-border-height; + left: 0px; + width: 100%; + background-color: @tab-background-color-active; + border-bottom: 1px solid @tab-bar-border-color; + border-top: 1px solid @tab-border-color; } - > li > a { - border: none; + .tab { + position: relative; + top: @tab-top-padding; + height: @tab-height; + line-height: @tab-height; + color: @text-color; + padding-left: 0; + margin-left: 15px; + border-top-right-radius: @tab-radius; + border-right: @tab-border; + box-shadow: inset -1px -1px 1px rgba(0,0,0, .05); + -webkit-transform: skewX(@tab-skew); + transition: color .1s ease-in; + + &, &:before { + background-image: -webkit-linear-gradient(top, @tab-background-color, darken(@tab-background-color, 6%)); + border-top: @tab-border; + } + + &:before { + content: ''; + position: absolute; + top: -1px; + left: -18px; + height: @tab-height; + width: 34px; + border-top-left-radius: @tab-radius; + border-left: @tab-border; + box-shadow: inset 1px -1px 1px rgba(0,0,0, .05); + -webkit-transform: skewX(133deg); + } + + .close-icon { + z-index: 3; + line-height: @tab-height; + -webkit-transform: skewX(-@tab-skew); + } + &.modified:not(:hover) .close-icon { + top: @tab-height/2 - @modified-icon-width/2 + 1px; + right: 14px; + width: @modified-icon-width; + height: @modified-icon-width; + } + + .title{ + -webkit-transform: skewX(-@tab-skew); + } } - > li.active > a { - .text(highlight); - border: none; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - background-color: @background-color-highlight; + .tab.active { + z-index: 10; + line-height: @tab-height - 2px; + color: @text-color-highlight; + + .title{ + position: relative; + top: 1px; + } + + .close-icon { + line-height: @tab-height - 1px; + } + + &, &:before { + background: @tab-background-color-active; + height: @tab-height + 1px; + box-shadow: none; + } + } + + .tab:hover { + color: @text-color-highlight; + } + + .tab.active:hover .close-icon { + color: @text-color-highlight; + } + + .placeholder { + height: @tab-height + @tab-top-padding + @tab-bottom-border-height; + &:after { + top: @tab-height + @tab-top-padding + @tab-bottom-border-height; + } } } diff --git a/stylesheets/ui-variables.less b/stylesheets/ui-variables.less index 919ffb3..8b8ab87 100644 --- a/stylesheets/ui-variables.less +++ b/stylesheets/ui-variables.less @@ -63,7 +63,7 @@ // Sizes -@font-size: 12px; +@font-size: 11px; @disclosure-arrow-size: 12px; From ed069869acec68cd2a7c337bdeccc3031c35978b Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 5 Nov 2013 18:28:52 -0500 Subject: [PATCH 2/8] fixing top: -1 --- stylesheets/tabs.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index 7eafeea..8924791 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -46,7 +46,7 @@ &:before { content: ''; position: absolute; - top: -1px; + top: 0px; left: -18px; height: @tab-height; width: 34px; @@ -54,6 +54,7 @@ border-left: @tab-border; box-shadow: inset 1px -1px 1px rgba(0,0,0, .05); -webkit-transform: skewX(133deg); + border-top: none; } .close-icon { From 2f5866aeff0753ec49a912232b00bdada98edf15 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Wed, 6 Nov 2013 13:17:17 -0500 Subject: [PATCH 3/8] &:before woes --- stylesheets/atom.less | 4 ++++ stylesheets/panels.less | 5 ----- stylesheets/tabs.less | 24 +++++++++++++----------- stylesheets/ui-variables.less | 8 ++++---- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/stylesheets/atom.less b/stylesheets/atom.less index f868642..54c444d 100644 --- a/stylesheets/atom.less +++ b/stylesheets/atom.less @@ -1,5 +1,9 @@ @import "ui-variables"; +* { + box-sizing: border-box; +} + #root-view { font: caption; background-color: @app-background-color; diff --git a/stylesheets/panels.less b/stylesheets/panels.less index d5c5743..8355b98 100644 --- a/stylesheets/panels.less +++ b/stylesheets/panels.less @@ -29,11 +29,6 @@ position: relative; background-color: @inset-panel-background-color; border-radius: @component-border-radius; - - border: 1px solid @inset-panel-border-color; - box-shadow: - inset 0 1px 3px fadeout(@inset-panel-border-color, 40%), - inset 0 -1px 3px fadeout(@background-color-highlight, 3%); } .is-blurred { diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index 8924791..aff1dd9 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -8,9 +8,10 @@ .tab-bar { height: @tab-height + @tab-top-padding + 5px; - background-image: -webkit-linear-gradient(top, @tab-bar-background-color, lighten(@tab-bar-background-color, 9%)); + background: tab-bar-background-color; box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15); padding: 0 10px; + box-sizing: border-box; &:after { content: ""; @@ -20,7 +21,6 @@ left: 0px; width: 100%; background-color: @tab-background-color-active; - border-bottom: 1px solid @tab-bar-border-color; border-top: 1px solid @tab-border-color; } @@ -37,24 +37,23 @@ box-shadow: inset -1px -1px 1px rgba(0,0,0, .05); -webkit-transform: skewX(@tab-skew); transition: color .1s ease-in; + box-shadow: inset -1px 1px 0 @tab-border-color; &, &:before { - background-image: -webkit-linear-gradient(top, @tab-background-color, darken(@tab-background-color, 6%)); - border-top: @tab-border; + background-image: -webkit-linear-gradient(top, lighten(#333, 7%), #333); } &:before { content: ''; position: absolute; - top: 0px; + top: 0; left: -18px; height: @tab-height; - width: 34px; + width: 40px; border-top-left-radius: @tab-radius; border-left: @tab-border; - box-shadow: inset 1px -1px 1px rgba(0,0,0, .05); -webkit-transform: skewX(133deg); - border-top: none; + box-shadow: inset 1px 1px 0 @tab-border-color; } .close-icon { @@ -76,8 +75,10 @@ .tab.active { z-index: 10; - line-height: @tab-height - 2px; + line-height: @tab-height - 4px; color: @text-color-highlight; + box-shadow: inset -1px -1px 0 @tab-border-color; + border: none; .title{ position: relative; @@ -89,9 +90,10 @@ } &, &:before { - background: @tab-background-color-active; + background-image: -webkit-linear-gradient(top, lighten(@tab-background-color-active, 7%), @tab-background-color-active); height: @tab-height + 1px; - box-shadow: none; + box-shadow: inset 1px 1px 0 @tab-border-color; + border: none; } } diff --git a/stylesheets/ui-variables.less b/stylesheets/ui-variables.less index 8b8ab87..bc2554f 100644 --- a/stylesheets/ui-variables.less +++ b/stylesheets/ui-variables.less @@ -45,11 +45,11 @@ @button-background-color-selected: #5c6064; @button-border-color: @base-border-color; -@tab-bar-background-color: @inset-panel-background-color; +@tab-bar-background-color: #222; @tab-bar-border-color: darken(@tab-background-color-active, 10%); -@tab-background-color: #292c2f; -@tab-background-color-active: @panel-heading-background-color; -@tab-border-color: transparent; +@tab-background-color: #333; +@tab-background-color-active: #222; +@tab-border-color: red; @tree-view-background-color: @tool-panel-background-color; @tree-view-border-color: @tool-panel-border-color; From 57320766ccafade746e46fd20215eb84c4835ea4 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Wed, 6 Nov 2013 13:35:29 -0500 Subject: [PATCH 4/8] fixable tabs --- stylesheets/panels.less | 1 - stylesheets/tabs.less | 13 +++++++------ stylesheets/ui-variables.less | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stylesheets/panels.less b/stylesheets/panels.less index 8355b98..71496bb 100644 --- a/stylesheets/panels.less +++ b/stylesheets/panels.less @@ -28,7 +28,6 @@ .inset-panel { position: relative; background-color: @inset-panel-background-color; - border-radius: @component-border-radius; } .is-blurred { diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index aff1dd9..be4fbcc 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -21,7 +21,7 @@ left: 0px; width: 100%; background-color: @tab-background-color-active; - border-top: 1px solid @tab-border-color; + border-top: 1px solid lighten(@tab-border-color, 5%); } .tab { @@ -75,10 +75,9 @@ .tab.active { z-index: 10; - line-height: @tab-height - 4px; + line-height: @tab-height - 3px; color: @text-color-highlight; - box-shadow: inset -1px -1px 0 @tab-border-color; - border: none; + box-shadow: inset -1px 1px 0 lighten(@tab-border-color, 5%); .title{ position: relative; @@ -92,8 +91,10 @@ &, &:before { background-image: -webkit-linear-gradient(top, lighten(@tab-background-color-active, 7%), @tab-background-color-active); height: @tab-height + 1px; - box-shadow: inset 1px 1px 0 @tab-border-color; - border: none; + } + + &:before { + box-shadow: inset 1px 1px 0 lighten(@tab-border-color, 5%); } } diff --git a/stylesheets/ui-variables.less b/stylesheets/ui-variables.less index bc2554f..1a921e5 100644 --- a/stylesheets/ui-variables.less +++ b/stylesheets/ui-variables.less @@ -49,7 +49,7 @@ @tab-bar-border-color: darken(@tab-background-color-active, 10%); @tab-background-color: #333; @tab-background-color-active: #222; -@tab-border-color: red; +@tab-border-color: #333; @tree-view-background-color: @tool-panel-background-color; @tree-view-border-color: @tool-panel-border-color; From 573b20411ca3c3578149eedae234979b6a1a3edc Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Wed, 6 Nov 2013 14:06:44 -0500 Subject: [PATCH 5/8] finally --- stylesheets/tabs.less | 20 +++++++++++++------- stylesheets/ui-variables.less | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index be4fbcc..d3bd68e 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -21,7 +21,7 @@ left: 0px; width: 100%; background-color: @tab-background-color-active; - border-top: 1px solid lighten(@tab-border-color, 5%); + border-top: 1px solid @tab-border-color; } .tab { @@ -33,11 +33,11 @@ padding-left: 0; margin-left: 15px; border-top-right-radius: @tab-radius; - border-right: @tab-border; box-shadow: inset -1px -1px 1px rgba(0,0,0, .05); -webkit-transform: skewX(@tab-skew); transition: color .1s ease-in; - box-shadow: inset -1px 1px 0 @tab-border-color; + box-shadow: inset -1px 1px 0 @tab-border-color, 4px 0px 4px rgba(0,0,0,.1); + border: none; &, &:before { background-image: -webkit-linear-gradient(top, lighten(#333, 7%), #333); @@ -51,9 +51,9 @@ height: @tab-height; width: 40px; border-top-left-radius: @tab-radius; - border-left: @tab-border; -webkit-transform: skewX(133deg); - box-shadow: inset 1px 1px 0 @tab-border-color; + box-shadow: inset 1px 1px 0 @tab-border-color, -4px 0px 4px rgba(0,0,0,.1); + border: none; } .close-icon { @@ -71,13 +71,18 @@ .title{ -webkit-transform: skewX(-@tab-skew); } + + &:first-child { + margin-left: 20px; + } } .tab.active { z-index: 10; line-height: @tab-height - 3px; color: @text-color-highlight; - box-shadow: inset -1px 1px 0 lighten(@tab-border-color, 5%); + box-shadow: inset -1px 1px 0 @tab-border-color, 4px -4px 4px rgba(0,0,0,.1); + border: none; .title{ position: relative; @@ -94,7 +99,8 @@ } &:before { - box-shadow: inset 1px 1px 0 lighten(@tab-border-color, 5%); + border: none; + box-shadow: inset 1px 1px 0 @tab-border-color, -4px -4px 4px rgba(0,0,0,.1); } } diff --git a/stylesheets/ui-variables.less b/stylesheets/ui-variables.less index 1a921e5..5847a0d 100644 --- a/stylesheets/ui-variables.less +++ b/stylesheets/ui-variables.less @@ -49,7 +49,7 @@ @tab-bar-border-color: darken(@tab-background-color-active, 10%); @tab-background-color: #333; @tab-background-color-active: #222; -@tab-border-color: #333; +@tab-border-color: #484848; @tree-view-background-color: @tool-panel-background-color; @tree-view-border-color: @tool-panel-border-color; From 05b9c12013e56d2df031da276f5d902ce8c500bb Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 6 Nov 2013 11:19:30 -0800 Subject: [PATCH 6/8] Use tab background color var --- stylesheets/tabs.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index d3bd68e..b570dd6 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -8,7 +8,7 @@ .tab-bar { height: @tab-height + @tab-top-padding + 5px; - background: tab-bar-background-color; + background: @tab-bar-background-color; box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15); padding: 0 10px; box-sizing: border-box; From f23fb3c07b0a519f8e9c2416dbf45a9efc039f4b Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 6 Nov 2013 11:40:06 -0800 Subject: [PATCH 7/8] Add a bottom border to the tabs. @mattgraham, if you don't like this, we can revert... --- stylesheets/tabs.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index b570dd6..55d223e 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -3,11 +3,12 @@ @modified-icon-width: 8px; @tab-skew: 30deg; @tab-top-padding: 5px; -@tab-bottom-border-height: 5px; +@tab-bottom-border-height: 8px; @tab-border: 1px solid @tab-border-color; +@tab-bar-bottom-border-color: #111; .tab-bar { - height: @tab-height + @tab-top-padding + 5px; + height: @tab-height + @tab-top-padding + @tab-bottom-border-height; background: @tab-bar-background-color; box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15); padding: 0 10px; @@ -22,6 +23,7 @@ width: 100%; background-color: @tab-background-color-active; border-top: 1px solid @tab-border-color; + border-bottom: 1px solid @tab-bar-bottom-border-color; } .tab { From d701da7a56ce1b0620938e7298bae4d80fcc5643 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 6 Nov 2013 14:45:23 -0800 Subject: [PATCH 8/8] Fix padding on the right side of the tabs to match left --- stylesheets/tabs.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylesheets/tabs.less b/stylesheets/tabs.less index 55d223e..62c38a1 100644 --- a/stylesheets/tabs.less +++ b/stylesheets/tabs.less @@ -11,7 +11,7 @@ height: @tab-height + @tab-top-padding + @tab-bottom-border-height; background: @tab-bar-background-color; box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15); - padding: 0 10px; + padding: 0 13px 0 10px; box-sizing: border-box; &:after {