2021-06-21 17:49:47 +00:00
|
|
|
.tabber {
|
2024-05-27 01:54:52 +00:00
|
|
|
// Codex tokens aren't avaliable in older MW version
|
2024-09-01 00:03:38 +00:00
|
|
|
--tabber-color-progressive: var( --color-progressive, #36c ); // @color-progressive
|
|
|
|
--tabber-color-progressive--hover: var( --color-progressive--hover, #447ff5 ); // @color-progressive--hover
|
|
|
|
--tabber-color-progressive--active: var( --color-progressive--active, #2a4b8d ); // @color-progressive--active
|
|
|
|
--tabber-color-base: var( --color-base, #202122 ); // @color-base
|
|
|
|
--tabber-color-subtle: var( --color-subtle, #54595d ); // @color-subtle
|
|
|
|
--tabber-background-color-button-quiet--hover: var( --background-color-button-quiet--hover, rgba( 0, 24, 73, 0.027 ) ); // @background-color-button-quiet--hover
|
|
|
|
--tabber-background-color-button-quiet--active: var( --background-color-button-quiet--active, rgba( 0, 24, 73, 0.082 ) ); // @background-color-button-quiet--active
|
|
|
|
--tabber-border-color-base: var( --border-color-base, #a2a9b1 ); // @border-color-base
|
2024-05-27 01:54:52 +00:00
|
|
|
--tabber-height-indicator: 2px;
|
2021-06-21 18:45:06 +00:00
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
/* establish primary containing box */
|
|
|
|
overflow: hidden;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2021-06-21 23:46:17 +00:00
|
|
|
&__tabs {
|
2021-06-21 18:45:06 +00:00
|
|
|
display: flex;
|
|
|
|
overflow: auto hidden;
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__section {
|
|
|
|
display: grid;
|
|
|
|
overflow: hidden;
|
|
|
|
block-size: 100%;
|
|
|
|
grid-auto-columns: 100%;
|
|
|
|
grid-auto-flow: column;
|
2022-10-21 19:54:24 +00:00
|
|
|
scroll-snap-type: x mandatory;
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__header {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
2022-10-21 22:01:38 +00:00
|
|
|
flex-direction: column;
|
2021-06-21 18:45:06 +00:00
|
|
|
/* defend against <section> needing 100% */
|
|
|
|
flex-shrink: 0;
|
2024-05-27 01:54:52 +00:00
|
|
|
box-shadow: inset 0 -1px 0 0 var( --tabber-border-color-base );
|
2021-06-21 18:45:06 +00:00
|
|
|
/* fixes cross browser quarks */
|
|
|
|
min-block-size: fit-content;
|
|
|
|
|
2024-05-25 04:33:22 +00:00
|
|
|
button {
|
|
|
|
/* Remove all default button styles */
|
|
|
|
all: unset;
|
|
|
|
}
|
|
|
|
|
2024-05-25 06:42:22 +00:00
|
|
|
/* additional specificity needed after reset button styles */
|
|
|
|
& &__prev {
|
2021-06-21 18:45:06 +00:00
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
2024-05-25 06:42:22 +00:00
|
|
|
& &__next {
|
2021-06-21 18:45:06 +00:00
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
2024-05-25 06:42:22 +00:00
|
|
|
& &__prev,
|
|
|
|
& &__next {
|
2021-06-21 18:45:06 +00:00
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
display: none;
|
|
|
|
width: 20px;
|
2021-06-22 00:37:28 +00:00
|
|
|
border-radius: 4px;
|
2021-06-21 18:45:06 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
2024-05-25 04:33:22 +00:00
|
|
|
&::after {
|
2021-06-21 18:45:06 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: inherit;
|
|
|
|
background-position: center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-size: 14px;
|
|
|
|
content: '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-21 23:46:17 +00:00
|
|
|
&--prev-visible .tabber__tabs {
|
2021-06-21 18:45:06 +00:00
|
|
|
-webkit-mask-image: linear-gradient( 90deg, transparent, #000 20% );
|
|
|
|
mask-image: linear-gradient( 90deg, transparent, #000 20% );
|
|
|
|
}
|
|
|
|
|
2021-06-21 23:46:17 +00:00
|
|
|
&--next-visible .tabber__tabs {
|
2021-06-21 18:45:06 +00:00
|
|
|
-webkit-mask-image: linear-gradient( 90deg, #000 80%, transparent );
|
|
|
|
mask-image: linear-gradient( 90deg, #000 80%, transparent );
|
|
|
|
}
|
|
|
|
|
2021-06-21 23:46:17 +00:00
|
|
|
&--prev-visible.tabber__header--next-visible .tabber__tabs {
|
2021-06-21 18:45:06 +00:00
|
|
|
-webkit-mask-image: linear-gradient( 90deg, transparent, #000 20%, #000 80%, transparent );
|
|
|
|
mask-image: linear-gradient( 90deg, transparent, #000 20%, #000 80%, transparent );
|
|
|
|
}
|
|
|
|
|
|
|
|
&--prev-visible .tabber__header__prev,
|
|
|
|
&--next-visible .tabber__header__next {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__header,
|
|
|
|
&__section {
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-27 01:54:52 +00:00
|
|
|
&__indicator {
|
|
|
|
display: none;
|
|
|
|
margin-top: ~'calc( var( --tabber-height-indicator ) * -1 )';
|
|
|
|
background: var( --tabber-color-progressive );
|
|
|
|
block-size: var( --tabber-height-indicator );
|
|
|
|
inline-size: 0;
|
|
|
|
|
|
|
|
&--visible {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-21 23:46:17 +00:00
|
|
|
&__tab {
|
2022-05-06 21:45:05 +00:00
|
|
|
padding: 0.5em 0.75em;
|
2024-06-02 17:10:14 +00:00
|
|
|
color: var( --tabber-color );
|
2021-06-21 18:45:06 +00:00
|
|
|
font-weight: bold;
|
|
|
|
text-decoration: none;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
&:visited {
|
2024-06-02 17:10:14 +00:00
|
|
|
color: var( --tabber-color );
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:active,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2024-05-27 01:54:52 +00:00
|
|
|
&[ aria-selected='true' ] {
|
|
|
|
box-shadow: 0 -2px 0 var( --tabber-color-progressive ) inset;
|
|
|
|
}
|
|
|
|
|
2022-10-23 21:07:19 +00:00
|
|
|
&[ aria-selected='true' ],
|
|
|
|
&[ aria-selected='true' ]:visited {
|
2024-05-27 01:54:52 +00:00
|
|
|
color: var( --tabber-color-progressive );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__tabs--animate {
|
|
|
|
.tabber__tab[ aria-selected='true' ] {
|
|
|
|
box-shadow: none;
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__panel {
|
2022-04-19 22:31:28 +00:00
|
|
|
height: max-content;
|
2022-08-13 22:38:49 +00:00
|
|
|
overflow-x: auto;
|
2022-10-21 19:54:24 +00:00
|
|
|
scroll-snap-align: start;
|
2022-04-19 14:36:38 +00:00
|
|
|
|
|
|
|
// Hide edit buttons for non-transclusion tabs since they don't work
|
|
|
|
/* stylelint-disable-next-line selector-class-pattern */
|
2024-05-25 04:33:22 +00:00
|
|
|
&:not( [ data-mw-tabber-page-title ] ) .mw-editsection {
|
2022-04-19 14:36:38 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2022-04-19 02:46:40 +00:00
|
|
|
|
|
|
|
&--loading {
|
2024-05-25 04:33:22 +00:00
|
|
|
.tabber__transclusion {
|
2024-05-25 07:40:39 +00:00
|
|
|
opacity: 0.1;
|
2024-05-25 04:33:22 +00:00
|
|
|
|
2024-05-25 07:40:39 +00:00
|
|
|
a {
|
|
|
|
color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
a,
|
2024-05-25 04:33:22 +00:00
|
|
|
&::before,
|
|
|
|
&::after {
|
2024-05-25 07:40:39 +00:00
|
|
|
display: block;
|
|
|
|
height: 0.5em;
|
|
|
|
border-radius: 40px;
|
|
|
|
margin-top: 1em;
|
|
|
|
animation-duration: 3s;
|
|
|
|
animation-fill-mode: forwards;
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
animation-name: skeletonload;
|
|
|
|
animation-timing-function: linear;
|
|
|
|
background: #000;
|
2024-05-27 01:54:52 +00:00
|
|
|
background: linear-gradient( to right, var( --tabber-color-base ) 8%, var( --tabber-color-subtle ) 18%, var( --tabber-color-base ) 33% );
|
2024-05-25 04:33:22 +00:00
|
|
|
}
|
2022-04-19 02:46:40 +00:00
|
|
|
|
2024-05-25 07:40:39 +00:00
|
|
|
&::before,
|
|
|
|
&::after {
|
|
|
|
content: '';
|
2024-05-25 04:33:22 +00:00
|
|
|
}
|
2022-04-19 02:46:40 +00:00
|
|
|
|
2024-05-25 04:33:22 +00:00
|
|
|
&::after {
|
2024-05-25 07:40:39 +00:00
|
|
|
width: 60%;
|
2024-05-25 04:33:22 +00:00
|
|
|
}
|
2022-04-19 02:46:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Animations
|
2024-05-25 04:33:22 +00:00
|
|
|
.tabber-animations-ready {
|
|
|
|
.tabber {
|
2024-05-25 19:27:47 +00:00
|
|
|
&__header {
|
|
|
|
scroll-behavior: smooth;
|
|
|
|
}
|
|
|
|
|
2024-05-25 04:33:22 +00:00
|
|
|
&__indicator {
|
|
|
|
transition: transform 250ms ease, width 250ms ease;
|
|
|
|
}
|
2024-05-25 19:27:47 +00:00
|
|
|
|
|
|
|
&__section,
|
|
|
|
&__tabs {
|
|
|
|
@media ( min-width: 720px ) {
|
|
|
|
scroll-behavior: smooth;
|
|
|
|
}
|
|
|
|
}
|
2024-05-25 04:33:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-19 20:34:04 +00:00
|
|
|
@media ( hover: none ) {
|
|
|
|
// Need extra specificity to override
|
|
|
|
.tabber {
|
|
|
|
.tabber__header {
|
|
|
|
&__prev,
|
|
|
|
&__next {
|
|
|
|
pointer-events: none; // Disable arrow button
|
|
|
|
|
2024-05-25 04:33:22 +00:00
|
|
|
&::after {
|
2022-04-19 20:34:04 +00:00
|
|
|
background-image: none; // Remove arrow icon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-21 18:45:06 +00:00
|
|
|
@media ( hover: hover ) {
|
|
|
|
.tabber {
|
2021-06-21 23:46:17 +00:00
|
|
|
&__tab {
|
2021-06-21 18:45:06 +00:00
|
|
|
&:hover {
|
2024-05-27 01:54:52 +00:00
|
|
|
color: var( --tabber-color-progressive--hover );
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2024-05-27 01:54:52 +00:00
|
|
|
color: var( --tabber-color-progressive--active );
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
}
|
2021-06-22 00:37:28 +00:00
|
|
|
|
|
|
|
&__header {
|
|
|
|
&__prev,
|
|
|
|
&__next {
|
|
|
|
&:hover {
|
2024-05-27 01:54:52 +00:00
|
|
|
background-color: var( --tabber-background-color-button-quiet--hover );
|
2021-06-22 00:37:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2024-05-27 01:54:52 +00:00
|
|
|
background-color: var( --tabber-background-color-button-quiet--active );
|
2022-10-21 22:01:38 +00:00
|
|
|
}
|
2022-06-03 20:46:42 +00:00
|
|
|
}
|
2021-06-21 18:45:06 +00:00
|
|
|
}
|
|
|
|
}
|
2021-06-21 17:49:47 +00:00
|
|
|
}
|
2024-05-25 07:40:39 +00:00
|
|
|
|
|
|
|
@keyframes skeletonload {
|
|
|
|
0% {
|
|
|
|
background-position: 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
background-position: 100em 0;
|
|
|
|
}
|
|
|
|
}
|
2024-07-14 21:55:13 +00:00
|
|
|
|
|
|
|
@media print {
|
|
|
|
.tabber__header {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Show all tab contents */
|
|
|
|
.tabber__section {
|
|
|
|
/* stylelint-disable-next-line declaration-no-important */
|
|
|
|
height: auto !important;
|
|
|
|
gap: 1em;
|
|
|
|
grid-auto-flow: row;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Show tab header */
|
|
|
|
.tabber__panel::before {
|
|
|
|
display: block;
|
|
|
|
margin: 1em 0;
|
|
|
|
content: attr( data-mw-tabber-title );
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|