mediawiki-skins-Citizen/resources/skins.citizen.styles/components/OverflowElements.less
alistair3149 83ab221408
feat(core): only handle wikitable instead of all tables
Wikis use tables in creative ways and it is probably just safer to only apply it to wikitables.
Might revisit if there are any news from T330527.
2024-05-29 17:47:13 -04:00

37 lines
990 B
Plaintext

@overflow-affordnance-size: 2rem;
.mask-gradient(@direction, @color1, @color2, @color3: null , @color4: null) {
-webkit-mask-image: linear-gradient( @direction, @color1, @color2 );
mask-image: linear-gradient( @direction, @color1, @color2 );
& when not(@color3 = null), not(@color4 = null) {
-webkit-mask-image: linear-gradient( @direction, @color1, @color2, @color3, @color4 );
mask-image: linear-gradient( @direction, @color1, @color2, @color3, @color4 );
}
}
// Elements enhanced by overflowElements.js
.citizen-overflow {
&-wrapper {
overflow-x: auto;
.wikitable {
display: table;
max-width: none;
overflow: initial;
}
}
&--left {
.mask-gradient(90deg, transparent, #000 @overflow-affordnance-size);
}
&--right {
.mask-gradient(270deg, transparent, #000 @overflow-affordnance-size);
}
&--left&--right {
.mask-gradient(90deg, transparent, #000 @overflow-affordnance-size, #000 ~'calc( 100% - @{overflow-affordnance-size} )', transparent);
}
}