Skip to content

Instantly share code, notes, and snippets.

@smileyj68
Created February 19, 2015 18:21
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 smileyj68/536306b205e4b5e768d6 to your computer and use it in GitHub Desktop.
Save smileyj68/536306b205e4b5e768d6 to your computer and use it in GitHub Desktop.
Tabcordion SCSS Breakdown
.tabs {
display: flex;
flex-flow: row wrap;
border: 0px solid #ddd;
border-width: 1px 0 0 1px;
.tab {
background: #f4f4f4;
height: 40px;
padding: 0 1rem;
line-height: 40px;
border: 0px solid #ddd;
border-width: 0 1px 1px 0;
margin: 0;
flex: 1 1 auto;
}
&>input {
position: absolute;
height: 0;
width: 0;
opacity: 0;
&:checked + label {
border-bottom: none;
background: none;
&+.tab-content { display: block; }
}
}
.tab-content {
display: none;
flex: 0 0 auto;
flex-basis: 100%;
width: 100%;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding: 1rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment