mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-29 18:05:19 +00:00
3c0559a71d
Consolidates the CSS responsible for styling chevrons into one implementation. This removes the need for custom padding and background positioning for the following components: - "more" menu - user menu - watchstar - language button - languge button in sticky header Instead of absolutely positioning the chevron on these components, the parent label element is set to `display: inline-flex` so that the chevron is vertically aligned and given enough space by default. The watchstar, although not a chevron, is also given the `display: inline-flex` treatment so that it can be aligned with other elements in the toolbar. This new implementation requires splitting the watchstar component into legacy and modern due to a quirk in Firefox that causes a bug with the watchstar in legacy Vector. NOTE: This change causes visual changes due to the difference in centering the chevrons via flexbox vs percentage positions. Bug: T308344, T310838 Change-Id: Ie9e0fce1366cd25a5899fee49770de4a09424fe2
62 lines
1.8 KiB
Plaintext
62 lines
1.8 KiB
Plaintext
@import '../../common/variables.less';
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
/**
|
|
* Styling for namespace tabs (page, discussion) and views (read, edit, view history, watch and other actions)
|
|
*/
|
|
|
|
/* Tab list items */
|
|
.vector-menu-tabs {
|
|
float: left;
|
|
padding-left: @border-width-base;
|
|
|
|
/* focus and hover have outlines. Text underline interferes with bottom border */
|
|
.mw-list-item a:focus,
|
|
.mw-list-item a:hover {
|
|
text-decoration: none;
|
|
border-bottom: @border-width-base @border-style-base;
|
|
}
|
|
|
|
.mw-list-item.new a,
|
|
.mw-list-item.new a:visited {
|
|
color: @color-link-new;
|
|
}
|
|
|
|
.mw-list-item.selected a,
|
|
.mw-list-item.selected a:visited {
|
|
color: @color-link-selected;
|
|
border-bottom: @border-width-base @border-style-base;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Tab list item appearance. Applies to both <li>'s inside .vector-menu-tabs
|
|
* and dropdown menus inside the article toolbar
|
|
*/
|
|
.vector-menu-tabs .mw-list-item,
|
|
.mw-article-toolbar-container .vector-menu-dropdown {
|
|
float: left;
|
|
white-space: nowrap;
|
|
margin: 0 @padding-horizontal-tabs;
|
|
|
|
// target links inside of .vector-tab-menu
|
|
// and dropdown menu headings inside the article toolbar.
|
|
// NOTE: Consider adding a single selector to define both items,
|
|
// since they both appear beside each other in the article toolbar.
|
|
& > a,
|
|
.vector-menu-heading {
|
|
display: inline-flex;
|
|
position: relative;
|
|
// Top & bottom padding to increase clickable area.
|
|
padding: 18px 0 7px 0;
|
|
// bottom margin to overlap border with toolbar border.
|
|
margin-bottom: -1px;
|
|
cursor: pointer;
|
|
border-bottom: @border-width-base @border-style-base transparent;
|
|
// max-height & box-sizing to make link, watchstar & dropdown height consistent.
|
|
// NOTE: Was 40px instead of 41, but changed to avoid visual regressions.
|
|
max-height: unit( 41 / @font-size-tabs / @font-size-browser, em );
|
|
box-sizing: border-box;
|
|
}
|
|
}
|