mediawiki-skins-Vector/resources/common/mixins.less

55 lines
1.6 KiB
Plaintext
Raw Normal View History

/**
* 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.
.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;
}