113 lines
2.2 KiB
SCSS
113 lines
2.2 KiB
SCSS
/////////////////////////////// Tabbed Content ///////////////////////////////
|
|
|
|
.tabs-wrapper { margin: 2.5rem 0 .5rem; }
|
|
.code-tabs-wrapper { margin: 1.5rem 0 .5rem; }
|
|
|
|
.tabs {
|
|
p {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
a {
|
|
flex-grow: 1;
|
|
margin: 2px;
|
|
position: relative;
|
|
font-size: 1rem;
|
|
font-weight: $medium;
|
|
padding: .65rem 1.25rem;
|
|
display: inline-block;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
color: $article-tab-text !important;
|
|
border-radius: $radius;
|
|
background-color: $article-tab-bg;
|
|
transition: background-color .2s, color .2s;
|
|
z-index: 1;
|
|
|
|
&:after {
|
|
content: "";
|
|
position: absolute;
|
|
display: block;
|
|
top: 0;
|
|
right: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: $radius;
|
|
@include gradient($article-btn-gradient);
|
|
opacity: 0;
|
|
transition: opacity .2s;
|
|
z-index: -1;
|
|
}
|
|
|
|
&:hover {
|
|
color: $article-tab-active-text !important;
|
|
&:after {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
&.is-active {
|
|
color: $article-tab-active-text !important;
|
|
&:after {
|
|
opacity: 1;
|
|
@include gradient($article-btn-gradient)
|
|
}
|
|
}
|
|
}
|
|
&.small {
|
|
p { justify-content: flex-start; }
|
|
a {
|
|
flex-grow: unset;
|
|
padding: .35rem 1rem;
|
|
}
|
|
}
|
|
// Style suggested for tabs that have uneven button widths because of wrapping.
|
|
&.even-wrap a {
|
|
flex-basis: 25%;
|
|
}
|
|
}
|
|
|
|
.code-tabs {
|
|
p {
|
|
margin: 0;
|
|
text-align: right;
|
|
display: block;
|
|
}
|
|
a {
|
|
padding: .1rem .75rem;
|
|
margin: 0;
|
|
border-radius: $radius $radius 0 0;
|
|
display: inline-block;
|
|
font-size: 1rem;
|
|
background: $article-bg;
|
|
color: rgba($article-tab-code-text, .5);
|
|
&:hover {
|
|
color: $article-tab-code-text;
|
|
}
|
|
&.is-active {
|
|
background-color: $article-code-bg;
|
|
color: $article-tab-code-text;
|
|
}
|
|
}
|
|
}
|
|
|
|
.code-tab-content {
|
|
padding: 0;
|
|
pre {
|
|
margin: 0 0 3rem;
|
|
border-radius: $radius 0 $radius $radius;
|
|
}
|
|
}
|
|
|
|
.tab-content, .code-tabs-content {
|
|
margin: .75rem 0 3rem;
|
|
width: 100%;
|
|
|
|
& > :not(table, .fs-diagram, img) {
|
|
width: 100%;
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
.tab-content:not(:first-of-type) { display: none; }
|
|
.code-tab-content:not(:first-of-type) { display: none; }
|