From 01cde54b767c380a058aab26306cc38c9fc6ebdd Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Mon, 24 Dec 2012 11:22:56 -0800 Subject: [PATCH] Changing the tab display style to a table layout. --- src/packages/tabs/src/tab.coffee | 1 + src/packages/tabs/src/tabs.css | 58 +++++++++++++++++++++----------- static/atom.css | 3 +- 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/packages/tabs/src/tab.coffee b/src/packages/tabs/src/tab.coffee index 67935a3d5..d4ab2451b 100644 --- a/src/packages/tabs/src/tab.coffee +++ b/src/packages/tabs/src/tab.coffee @@ -4,6 +4,7 @@ module.exports = class Tab extends View @content: (editSession) -> @div class: 'tab', => + console.log(editSession) @span class: 'file-name', outlet: 'fileName' @span class: 'close-icon' diff --git a/src/packages/tabs/src/tabs.css b/src/packages/tabs/src/tabs.css index 03388f65c..32d2d1516 100644 --- a/src/packages/tabs/src/tabs.css +++ b/src/packages/tabs/src/tabs.css @@ -1,34 +1,47 @@ .tabs { - background: #222; - border-bottom: 4px solid #555; + background: #333333; + table-layout: fixed; + display: table; + border-bottom: 4px solid #424242; } .tab { cursor: default; - float: left; - margin: 4px; - margin-bottom: 0; - margin-right: 0; - padding-left: 4px; - padding-right: 4px; - background: #3a3a3a; - color: #d0d0d0; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - font-size: 90%; + padding: 2px 21px 2px 9px; + background-image: -webkit-linear-gradient(#444, #3d3d3d); + color: #a5aaaa; + display: table-cell; + width: 1%; + position: relative; + border-top: 1px solid #4a4a4a; + border-right: 1px solid #2e2e2e; + border-bottom: 1px solid #2e2e2e; + box-shadow: 0 1px 0 #585858, inset -1px 0 0 #4a4a4a, inset 1px 0 0 #4a4a4a; + max-width: 100px; } -.tab.active { - background: #555; - color: white; +.tab.active, +.tab.active:hover { + color: #dae6e6; + box-shadow: inset -1px 0 0 #595959, inset 1px 0 0 #595959; + border-bottom: 0 none; + background-image: -webkit-linear-gradient(#555555, #424242); } -.tab:last-child { - margin-right: 4px; +.tab:hover { + color: #c8c8c5; + background-image: -webkit-linear-gradient(#474747, #444444); } .tab .file-name { - margin-right: 5px; + font-size: 12px !important; + font-weight: normal !important; + display: inline-block; + max-width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + text-shadow: 0 -1px 1px black; } .tab .close-icon { @@ -36,12 +49,17 @@ font-size: 14px; width: 14px; height: 14px; + display: block; color: #777; cursor: pointer; + position: absolute; + right: 4px; + top: -1px; + -webkit-font-smoothing: antialiased; } .tab .close-icon:before { - content: "\f050"; + content: "\f081"; } .tab .close-icon:hover { diff --git a/static/atom.css b/static/atom.css index e7b073fb5..6bd459333 100644 --- a/static/atom.css +++ b/static/atom.css @@ -1,5 +1,5 @@ html, body { - font: 16px Inconsolata, Monaco, Courier !important; + font: 16px Consolas, Inconsolata, Monaco, Courier !important; width: 100%; height: 100%; overflow: hidden; @@ -8,6 +8,7 @@ html, body { #root-view { height: 100%; overflow-y: auto; + overflow-x: hidden; position: relative; background-image: url(images/linen.png); }