1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
.tabset {
--borderWidth: 1px;
--tabsetPadding: var(--baseLineHeight);
margin: var(--baseLineHeight) 0;
}
.tabset-tablist {
display: flex;
overflow-x: auto;
}
.tabset-tab {
padding: .6rem var(--tabsetPadding);
min-height: 46px; /* matches admonition title, which has icon that adds height */
font-family: var(--sansFontFamily);
background-color: var(--tabBackground);
color: var(--tab);
border: var(--borderWidth) solid var(--tabBorder);
margin-right: calc(-1 * var(--borderWidth));
border-top-width: 4px;
border-top-color: var(--tabBorderTop);
border-radius: 0;
border-top-left-radius: var(--borderRadius);
border-top-right-radius: var(--borderRadius);
box-shadow: 0 -3px 4px var(--tabShadow) inset;
cursor: pointer;
}
.tabset-tab[aria-selected=true] {
border-bottom-color: var(--tabBackground);
border-top-color: var(--mainLight);
box-shadow: none;
}
/* Keyboard navigation focus state (increased contrast) */
.tabset-tab[aria-selected=true]:focus-visible {
background-color: var(--mainLight);
border-color: var(--mainLight);
color: var(--white); /* light works best for both light and dark themes given background colors */
}
.tabset-panel {
padding: 0 var(--tabsetPadding);
border: var(--borderWidth) solid var(--tabBorder);
margin-top: calc(-1 * var(--borderWidth));
border-bottom-left-radius: var(--borderRadius);
border-bottom-right-radius: var(--borderRadius);
}
@media screen and (max-width: 768px) {
.tabset {
--tabsetPadding: calc(var(--baseLineHeight) / 2);
}
.tabset-panel {
padding-top: calc(var(--tabsetPadding) / 2);
padding-bottom: calc(var(--tabsetPadding) / 2);
}
.tabset-panel pre,
.tabset-panel blockquote,
.tabset-panel section.admonition {
margin-left: calc(-1 * var(--tabsetPadding)) !important;
margin-right: calc(-1 * var(--tabsetPadding)) !important;
}
.tabset-panel > pre code {
border-left-width: 0;
border-right-width: 0;
}
}
|