Created
July 22, 2020 15:45
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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