mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-19 01:01:00 +00:00
38ca243e39
Replacing 'mediawiki.ui/variables.less' @import with new skin-aware 'mediawiki.skin.variables.less' standard. Removing calls for 'mediawiki.skin.variables.less' in favor for 'minerva.variables.less' for consistency. Also - replacing several static values with new Codex design token featuring skin variables of `background-color`, `color`, `border-*` and `transition` categories - renaming several Less variables to variable naming standard - moving a small number of MinervaNeue specific variables into 'minderva.variables.less' file. Those should be replaced in mid-future by Codex design tokens Please note, that this patch is not replacing all values with possible Codex tokens. It's just applying them on selected categories for consistency for now to keep the patch easier reviewable. Further replacements will be done in follow-up patches. Bump MediaWiki core required version to >= v1.41.0. Bug: T319381 Bug: T332541 Depends-On: I98c8cc27527533e2efb3b987ee34bc403e988b75 Change-Id: I86c5a35377541a784552c29456e0b8b507b3ee9c
247 lines
6.2 KiB
Plaintext
247 lines
6.2 KiB
Plaintext
@import '../../minerva.less/minerva.variables.less';
|
|
@import '../../minerva.less/minerva.mixins.less';
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
/* stylelint-disable no-descending-specificity */
|
|
html,
|
|
body {
|
|
// Ensure overlays take up full screen
|
|
height: 100%;
|
|
}
|
|
|
|
html {
|
|
font-size: @font-size-root;
|
|
// Support Safari: Prevent font scaling in landscape
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
-webkit-text-size-adjust: none;
|
|
}
|
|
|
|
body {
|
|
background-color: @background-color-base;
|
|
color: @color-base;
|
|
// Support All Browsers: Remove `margin` (normalized)
|
|
margin: 0;
|
|
}
|
|
|
|
main {
|
|
// Support IE 9-11: Apply correct `display` (normalized), see T207618.
|
|
display: block;
|
|
}
|
|
|
|
.mw-body {
|
|
// avoid margin collapsing (see T147956)
|
|
border-top: @border-width-base @border-style-base @border-color-transparent;
|
|
padding-bottom: 32px;
|
|
}
|
|
|
|
.overlay-enabled,
|
|
.mw-body {
|
|
background-color: @background-color-base;
|
|
}
|
|
|
|
// If footer has last modified list item (Desktop MinervaNeue ?useformat=desktop&useskin=minerva),
|
|
// hide it (T173545).
|
|
// stylelint-disable-next-line selector-max-id
|
|
.navigation-drawer--loading,
|
|
#footer-info-lastmod {
|
|
display: none;
|
|
}
|
|
|
|
// Override rule in MobileFrontend (
|
|
// (ul.footer-info li in resources/mobile.init.styles.less)
|
|
// to show copyright.
|
|
// stylelint-disable-next-line selector-max-id
|
|
#footer-info-copyright {
|
|
display: block;
|
|
}
|
|
|
|
// JavaScript overlay and server side rendered header
|
|
.overlay-header,
|
|
.minerva-header {
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
border-spacing: 0;
|
|
border-collapse: collapse;
|
|
height: @siteHeaderHeight;
|
|
white-space: nowrap;
|
|
// When banners are present we want to easily distinguish between them and the header so add border
|
|
border-top: @border-subtle;
|
|
// Hide the header border top when a banner is not present.
|
|
margin-top: -@border-width-base;
|
|
}
|
|
|
|
//
|
|
// Search
|
|
//
|
|
.minerva-search-form {
|
|
display: flex;
|
|
width: 100%;
|
|
flex-grow: 1;
|
|
align-items: center;
|
|
|
|
> button {
|
|
margin-left: auto;
|
|
}
|
|
}
|
|
|
|
// Search input
|
|
// Used in minerva header and search overlay header
|
|
.search-box .search {
|
|
@size-icon-search: unit( 18 / @font-size-browser, em );
|
|
@size-icon-search-gutter: unit( 8 / @font-size-browser, em );
|
|
@size-modifier-border: unit( 1 / @font-size-browser, em );
|
|
@padding-vertical-search: 8px - @border-width-base;
|
|
@padding-start-search-icon: @size-icon-search + ( 2 * @size-icon-search-gutter ) - @size-modifier-border;
|
|
background-color: @background-color-base; // Support Fennec, Opera Mini: Remove default background, see T38490.
|
|
background-position: left @size-icon-search-gutter center;
|
|
background-repeat: no-repeat;
|
|
background-size: @size-icon-search;
|
|
// Support Safari: Get rid of rounded corners.
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
-webkit-appearance: none;
|
|
width: 100%;
|
|
margin-top: 0;
|
|
height: 2.25em;
|
|
border: @border-width-base @border-style-base @border-color-inverted;
|
|
border-radius: @border-radius-base;
|
|
padding: @padding-vertical-search 0 @padding-vertical-search @padding-start-search-icon;
|
|
box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.05 );
|
|
// Keyboard focus is taken care of below at `.search:focus`.
|
|
outline: 0;
|
|
transition-property: border-color, box-shadow;
|
|
transition-duration: @transition-duration-medium;
|
|
|
|
// [T139928] Hide all pseudo-elements added to search inputs in WebKit.
|
|
&::-webkit-search-decoration,
|
|
&::-webkit-search-cancel-button,
|
|
&::-webkit-search-results-button,
|
|
&::-webkit-search-results-decoration {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
// Provide focus styles only in non-JS and overlay to prevent double transition.
|
|
.client-nojs .search-box .search:focus,
|
|
.search-overlay .search-box .search:focus {
|
|
border-color: @border-color-progressive--focus;
|
|
box-shadow: @box-shadow-inset-small @box-shadow-color-progressive--focus, 0 1px 1px rgba( 0, 0, 0, 0.05 );
|
|
}
|
|
|
|
.content {
|
|
h2 {
|
|
// Clear table of contents and any other floated elements in desktop Minerva.
|
|
clear: left;
|
|
}
|
|
|
|
.collapsible-heading .edit-page {
|
|
visibility: hidden;
|
|
}
|
|
|
|
.collapsible-heading.open-block {
|
|
// Restrict to child so that child section edit links do not get revealed.
|
|
.edit-page {
|
|
visibility: visible;
|
|
}
|
|
}
|
|
|
|
.mw-parser-output > h2,
|
|
.section-heading {
|
|
border-bottom: @border-width-base @border-style-base #eaecf0;
|
|
margin-bottom: @headingMargin;
|
|
}
|
|
|
|
.mw-parser-output {
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
display: flex;
|
|
|
|
.mw-headline {
|
|
flex-grow: 1;
|
|
flex-basis: 0;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.mw-editsection {
|
|
align-self: center;
|
|
// Negative margins to prevent the edit icon from affecting the height of the heading
|
|
margin-top: -1em;
|
|
margin-bottom: -1em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// stylelint-disable selector-max-id
|
|
#page-secondary-actions {
|
|
a {
|
|
margin: 10px 2px 2px 0;
|
|
}
|
|
}
|
|
|
|
// It may be better to express these in a single class
|
|
// or think about using extend or a mixin to stay with semantic selectors
|
|
// https://css-tricks.com/the-extend-concept/
|
|
#bodyContent .panel .content,
|
|
.overlay .content-header,
|
|
.overlay .panel,
|
|
.page-list.side-list .list-thumb,
|
|
.page-list li,
|
|
.topic-title-list li,
|
|
.site-link-list li,
|
|
.drawer,
|
|
/*Specificity needed to override content styles in core. */
|
|
.content h2.list-header,
|
|
.list-header,
|
|
.mw-revision {
|
|
padding-left: @contentPadding;
|
|
padding-right: @contentPadding;
|
|
}
|
|
|
|
.image-list,
|
|
.minerva-anon-talk-message,
|
|
.pre-content,
|
|
/* Form only pages e.g Special:MobileOptions */
|
|
#mw-content-text > form > .oo-ui-fieldLayout > .oo-ui-fieldLayout-body,
|
|
/* Save button on Special:MobileOptions */
|
|
#mw-content-text > form > .oo-ui-widget,
|
|
.content,
|
|
.post-content {
|
|
margin: 0 @contentMargin;
|
|
}
|
|
|
|
// T217197
|
|
// FIXME: minerva__subtitle can be removed when cache has cleared.
|
|
#mw-content-subtitle,
|
|
.minerva__subtitle {
|
|
margin-top: 10px;
|
|
margin-bottom: 10px;
|
|
|
|
&:empty {
|
|
margin: 0;
|
|
}
|
|
}
|
|
// stylelint-enable selector-max-id
|
|
|
|
@media all and ( min-width: @width-breakpoint-tablet ) {
|
|
/* FIXME: this should be one generic class name */
|
|
/* SpecialMobileEditWatchlist */
|
|
.page-summary-list,
|
|
/* Talk overlay */
|
|
.topic-title-list,
|
|
/* structured languages, mobile pagelists */
|
|
.site-link-list,
|
|
/* overlays */
|
|
.overlay .panel,
|
|
/* language overlay / MobileSpecialPageFeed */
|
|
.list-header {
|
|
padding-left: @contentPaddingTablet;
|
|
padding-right: @contentPaddingTablet;
|
|
}
|
|
}
|
|
/* stylelint-enable no-descending-specificity */
|