mediawiki-skins-Vector/resources/common/mixins.less
Jon Robson c56505de85 Dropdown arrow pixel should only apply to modern Vector
This is leaking into legacy Vector as well.

Bug: T322673
Change-Id: Iec9714395539ae7739b4136c87b481a691e2a516
2022-11-10 01:38:30 +00:00

55 lines
1.6 KiB
Plaintext

/**
* Less mixins shared between both legacy and Vector 2022.
*/
// Defines the arrow beside dropdown headings.
.mixin-vector-menu-heading-arrow() {
content: '';
background: url( ../common/images/arrow-down.svg ) 100% 50% no-repeat;
width: unit( 16 / @font-size-tabs / @font-size-browser, em );
height: unit( 16 / @font-size-tabs / @font-size-browser, em );
// FIXME: This can be folded into the main mixin as soon as wgVectorVisualEnhancementNext
// is default. This rule should not apply to the current master as is part of a larger
// set of changes that must go out together.
.skin-vector-2022.vector-feature-visual-enhancement-next-enabled & {
// https://phabricator.wikimedia.org/T319070#8284272
margin-left: -1px;
}
}
.mixin-vector-dropdown-menu-item() {
min-height: @height-dropdown-menu-item;
display: flex;
align-items: center;
padding: @padding-dropdown-menu-item;
&:visited {
color: @color-link;
}
&.selected a,
&.selected a:visited {
color: @color-link-selected;
}
}
// Copied from mediawiki.ui.icons
// (Ifccaadabd72a12814d3d4d01200931f7254c6cd5)
// but converted to px to match `mw-ui-button`
@icon-padding-md: 12px;
// Copied from mediawiki.ui.icons,
// (Ifccaadabd72a12814d3d4d01200931f7254c6cd5)
// but converted to px to match `mw-ui-button`
@icon-padding-md-next: 5px;
// FIXME: Deprecated. Remove when VectorVisualEnhancementNext is everywhere
.mixin-vector-flush-left-margin-left() {
margin-left: -@icon-padding-md;
}
// FIXME: Deprecated. Remove when VectorVisualEnhancementNext is everywhere
.mixin-vector-flush-right-margin-right() {
margin-right: -@icon-padding-md;
}