mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 11:58:44 +00:00
751454d7a8
Replaces font-sizes that are between 12-14 px with ones that equal 14px. This involved converting some values to rems as well as changing their size. @font-size-tabs (a computed 13px value) is removed in favour of unit( @font-size-small, rem). This removal requires the following changes: * Removing max-height & box-sizing from tabs, since they used @font-size-tabs for size calculations * modifying .mixin-vector-arrowed-dropdown-toggle() to use `unit( 12 / @font-size-browser, rem )` instead of `unit( 16 / @font-size-tabs / @font-size-browser, em )` * Changes to the position of `.vector-toc-toggle` since it's width/height depended on .mixin-vector-arrowed-dropdown-toggle() Opportunistic refactor: - `.mixin-vector-legacy-menu-heading-arrow()` is removed from Zebra Expected visual changes: font-sizes below refer to computed values, actual values are now set in rems. * Text in tabs is 14px not 13px * #siteSub is 14px not 12.8px * #contentSub is 14px not 11.76px * #contentSub line height is default, not 1.2 * dropdown [hide] labels are 14px instead of 13px ************************* *****VISUAL CHANGE***** ************************* : 91 changes in Pixel due to content being pushed down due to bigger font-size in toolbar. Bug: T346062 Bug: T261334 Change-Id: I6cfc800bb8dfed206670e5365bdc55e5d7357a4a
177 lines
3.9 KiB
Plaintext
177 lines
3.9 KiB
Plaintext
/*
|
|
* Vector's common typography rules,
|
|
* including whitespace with `margin` & `padding` and list bullets
|
|
* as part of typographic styles. Iconography wouldn't belong here.
|
|
*
|
|
*/
|
|
|
|
html {
|
|
font-size: @font-size-root;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
font-family: @font-family-sans;
|
|
}
|
|
|
|
ul {
|
|
// `list-style-image` sits on `ul` as it inherits and we don't need to worry about `ol`.
|
|
// No need for PNG fallback. Fallback is browser default (a smaller, also black, circle).
|
|
list-style-image: url( images/bullet-icon.svg );
|
|
}
|
|
|
|
pre,
|
|
.mw-code {
|
|
line-height: @line-height-code;
|
|
}
|
|
|
|
.mw-jump-link:not( :focus ) {
|
|
.mixin-screen-reader-text;
|
|
.user-select( none );
|
|
}
|
|
|
|
/* Use unscoped selector to allow edit sections outside of .mw-body-content and .vector-body (T160269) */
|
|
.mw-editsection,
|
|
.mw-editsection-like {
|
|
font-family: @font-family-sans;
|
|
}
|
|
|
|
/* Main content area, including siteNotice, indicators, categories, firstHeading and `.vector-body`. */
|
|
.mw-body {
|
|
// h1's can exist outside of `.mw-body-content` so some heading styles
|
|
// therefore need to be defined in `.mw-body` as well.
|
|
& h1,
|
|
&-content h1,
|
|
&-content h2 {
|
|
margin-bottom: 0.25em;
|
|
padding: 0;
|
|
font-family: @font-family-serif;
|
|
line-height: @line-height-xx-small;
|
|
|
|
// Fallback heading font for scripts which render poorly in `@font-family-serif`.
|
|
// See T73240
|
|
&:lang( ja ), /* See T65817 */
|
|
&:lang( he ), /* See T65843 and T65844 */
|
|
&:lang( ko ) { /* See T65827 */
|
|
font-family: @font-family-sans--fallback;
|
|
}
|
|
|
|
&:lang( ckb ) { /* See T306317 */
|
|
font-family: 'Scheherazade', @font-family-serif;
|
|
}
|
|
|
|
/* Burmese (Myanmar) language headlines would be cropped with set `line-height` */
|
|
/* See T193270 */
|
|
&:lang( my ) {
|
|
line-height: normal;
|
|
}
|
|
}
|
|
|
|
& h1,
|
|
&-content h1 {
|
|
font-size: @font-size-heading-1;
|
|
}
|
|
}
|
|
|
|
// T335625 - Move siteSub into common.less to prevent it from being feature-flagged
|
|
// and overriding on-wiki modifications.
|
|
#siteSub {
|
|
// By default the sitesub (i.e. tagline) is hidden as it was hidden in Vector legacy but site styles can reveal.
|
|
display: none;
|
|
}
|
|
|
|
.vector-body {
|
|
// Support IE 9-11, Trident cuts values 2 digits after decimal point.
|
|
// `calc` enables to set correct calculation in place again. See T102364.
|
|
font-size: @font-size-base--trident-hack;
|
|
font-size: var( --font-size-medium );
|
|
line-height: @line-height-base;
|
|
|
|
#siteSub {
|
|
font-size: unit( @font-size-small, rem ); // T311421
|
|
}
|
|
|
|
h1 {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
h2 {
|
|
margin-top: 1em;
|
|
font-size: @font-size-heading-2;
|
|
}
|
|
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin-top: 0.3em;
|
|
margin-bottom: 0;
|
|
padding-bottom: 0;
|
|
line-height: @line-height-base;
|
|
}
|
|
|
|
h3 {
|
|
font-size: @font-size-heading-3;
|
|
}
|
|
|
|
h3,
|
|
h4 {
|
|
font-weight: bold;
|
|
}
|
|
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
font-size: @font-size-reset; // Reset.
|
|
}
|
|
|
|
.toc h2 {
|
|
font-family: @font-family-sans;
|
|
font-size: @font-size-reset; // Reset.
|
|
}
|
|
|
|
p {
|
|
margin: 0.5em 0;
|
|
}
|
|
|
|
blockquote {
|
|
border-left: @border-start-blockquote;
|
|
padding: @padding-blockquote;
|
|
|
|
// Ensure not to inherit whitespace mashing margins on child elements.
|
|
> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// External links
|
|
// Use of `a` element selector for limiting generic class scope due to `.external` widespread usage.
|
|
.mw-parser-output {
|
|
a {
|
|
// Deal with long links (T327334, inspired by Minerva solution T62387)
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
a.external {
|
|
// Use copy of Codex/OOUI WikimediaUI theme's 'linkExternal' icon in progressive color.
|
|
// Note that CSSJanus is flipping the `ltr` in the URL to `rtl`.
|
|
// Therefore make sure that both icons are available and up-to-date.
|
|
background-image: url( images/link-external-small-ltr-progressive.svg );
|
|
background-position: center right;
|
|
background-repeat: no-repeat;
|
|
// Equivalent of `12px` at calculation base of `14px` is `0.857em`.
|
|
background-size: 0.857em;
|
|
padding-right: 1em;
|
|
|
|
// See T330712 for better understanding of this class and any future changes.
|
|
&.free {
|
|
word-break: break-all;
|
|
}
|
|
}
|
|
}
|