Skip to content

Instantly share code, notes, and snippets.

@cdcharlebois
Created July 22, 2020 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdcharlebois/bc8e9bc54a190ee2a50964721d3ac567 to your computer and use it in GitHub Desktop.
Save cdcharlebois/bc8e9bc54a190ee2a50964721d3ac567 to your computer and use it in GitHub Desktop.
snippet to render a tab container with vertical tabs (and panels on the right)
.tabs-vertical {
display: flex;
> ul {
// tabs
flex: 1;
border: none;
> li {
&.active {
border-left: 0.35em solid $brand-inverse;
margin-left: -0.35em;
a {
// @extend .background-inverse-lighter;
@extend .text-bold;
}
}
> a {
border: none !important;
border-radius: 0 !important;
&:hover {
@extend .background-default-lighter;
}
}
width: 100%;
}
}
> div {
// panels
flex: 5;
@extend .spacing-outer-left-layout;
}
}
@cdcharlebois
Copy link
Author

cdcharlebois commented Jul 22, 2020

FYI you can change the relative widths of the tabs and the panels here by changing the flex values on lines 5 and 28, respectively

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