Skip to content

Instantly share code, notes, and snippets.

@jasesmith
Last active December 10, 2020 01:18
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jasesmith/4b4a5ab6445ed8ce7c23791041c31408 to your computer and use it in GitHub Desktop.
Save jasesmith/4b4a5ab6445ed8ce7c23791041c31408 to your computer and use it in GitHub Desktop.
For vertically stacked open file tabs, put this in your `./atom/styles.less`
atom-workspace-axis.vertical atom-pane {
flex-direction: row;
.tab-bar:not(:empty) {
box-shadow: inset -1px 0 0 #181a1f;
resize: horizontal;
height: auto;
display: block;
padding-right: 1px;
padding-bottom: 3em;
min-width: 14em;
&::after {
content: '';
position: absolute;
bottom: 1px;
right: 1px;
width: 0;
height: 0;
border: .7em solid transparent;
border-color: transparent @ui-site-color-2 @ui-site-color-2 transparent;
box-shadow: 1px 1px 0 0 #181a1f;
}
}
.tab-bar .tab {
display: block;
border: none;
}
.tab-bar .tab,
.tab-bar .tab.active {
flex: none;
width: auto;
max-width: none;
box-shadow: inset 0 -1px 0 0 #181a1f;
}
.tab-bar .tab .title {
text-align: left;
}
}
@jasesmith
Copy link
Author

jasesmith commented Sep 22, 2017

atom-vertical-file-tabs

Resizing the tab bar width is possible with the resize: horizontal; style. The file tabs container can be resized by dragging the little blue triangle in the bottom right corner of the tab bar (like a textarea element).

This is a little bit awkward, but maybe there's a way to run a launch script that could add/control a resize handle like normal column resizing interactions.

@jasesmith
Copy link
Author

Update: added :not(:empty) to the .tab-bar rule so the tab bar won't invoke the ::after resize cue when there are no open files — this lets the tab-bar respect the display: none from the base tab-bar component styles for an empty tab-bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment