Debian Codegraph @

skins/Vector/resources/skins.vector.styles.legacy/typography.less

raw
1 /*
2 * Vector's common typography rules,
3 * including whitespace with `margin` & `padding` and list bullets
4 * as part of typographic styles. Iconography wouldn't belong here.
5 *
6 */
7
8 html {
9 font-size: @font-size-root;
10 }
11
12 html,
13 body {
14 font-family: @font-family-sans;
15 }
16
17 ul {
18 // `list-style-image` sits on `ul` as it inherits and we don't need to worry about `ol`.
19 // No need for PNG fallback. Fallback is browser default (a smaller, also black, circle).
20 list-style-image: url( images/bullet-icon.svg );
21 }
22
23 pre,
24 .mw-code {
25 line-height: @line-height-code;
26 }
27
28 .mw-jump-link:not( :focus ) {
29 .mixin-screen-reader-text;
30 .user-select( none );
31 }
32
33 /* Use unscoped selector to allow edit sections outside of .mw-body-content and .vector-body (T160269) */
34 .mw-editsection,
35 .mw-editsection-like {
36 font-family: @font-family-sans;
37 }
38
39 /* Main content area, including siteNotice, indicators, categories, firstHeading and `.vector-body`. */
40 .mw-body {
41 // h1's can exist outside of `.mw-body-content` so some heading styles
42 // therefore need to be defined in `.mw-body` as well.
43 & h1,
44 & .mw-heading1,
45 &-content h1,
46 &-content .mw-heading1,
47 &-content h2,
48 &-content .mw-heading2 {
49 margin-bottom: 0.25em;
50 padding: 0;
51 font-family: @font-family-serif;
52 line-height: @line-height-xx-small;
53
54 // Fallback heading font for scripts which render poorly in `@font-family-serif`.
55 // See T73240
56 &:lang( ja ), /* See T65817 */
57 &:lang( he ), /* See T65843 and T65844 */
58 &:lang( ko ) { /* See T65827 */
59 font-family: @font-family-sans--fallback;
60 }
61
62 &:lang( ckb ) { /* See T306317 */
63 font-family: 'Scheherazade', @font-family-serif;
64 }
65
66 /* Burmese (Myanmar) language headlines would be cropped with set `line-height` */
67 /* See T193270 */
68 &:lang( my ) {
69 line-height: normal;
70 }
71 }
72
73 & h1,
74 & .mw-heading1,
75 &-content h1,
76 &-content .mw-heading1 {
77 font-size: @font-size-heading-1;
78 }
79 }
80
81 // T335625 - Move siteSub into common.less to prevent it from being feature-flagged
82 // and overriding on-wiki modifications.
83 #siteSub {
84 // By default the sitesub (i.e. tagline) is hidden as it was hidden in Vector legacy but site styles can reveal.
85 display: none;
86 }
87
88 .vector-body {
89 font-size: @font-size-small;
90 // Support IE 9-11, Trident cuts values 2 digits after decimal point.
91 // `calc` enables to set correct calculation in place again. See T102364.
92 font-size: @font-size-small--trident-hack;
93 line-height: @line-height-base;
94
95 #siteSub {
96 font-size: 12.8px; // T311421
97 }
98
99 .mw-heading1,
100 h1 {
101 margin-top: 1em;
102 }
103
104 .mw-heading2,
105 h2 {
106 margin-top: 1em;
107 font-size: @font-size-heading-2;
108 }
109
110 .mw-heading3,
111 h3,
112 .mw-heading4,
113 h4,
114 .mw-heading5,
115 h5,
116 .mw-heading6,
117 h6 {
118 margin-top: 0.3em;
119 margin-bottom: 0;
120 padding-bottom: 0;
121 line-height: @line-height-base;
122 }
123
124 .mw-heading3,
125 h3 {
126 font-size: @font-size-heading-3;
127 }
128
129 .mw-heading3,
130 h3,
131 .mw-heading4,
132 h4 {
133 font-weight: bold;
134 }
135
136 .mw-heading4,
137 h4,
138 .mw-heading5,
139 h5,
140 .mw-heading6,
141 h6 {
142 font-size: @font-size-reset; // Reset.
143 }
144
145 // On Talk:Test?dtenable=0 h2 is inside mw-heading which results in larger than
146 // expected font size since @font-size-heading-2 is defined in ems (T357929).
147 // TODO: Consider switching font-sizes to rems instead of ems to remove these styles.
148 .mw-heading1 h1,
149 .mw-heading2 h2,
150 .mw-heading3 h3,
151 .mw-heading4 h4,
152 .mw-heading5 h5,
153 .mw-heading6 h6 {
154 margin-top: 0;
155 font-size: inherit;
156 }
157
158 .toc h2 {
159 font-family: @font-family-sans;
160 font-size: @font-size-reset; // Reset.
161 }
162
163 p {
164 margin: 0.5em 0;
165 }
166
167 blockquote {
168 border-left: @border-start-blockquote;
169 padding: @padding-blockquote;
170
171 // Ensure not to inherit whitespace mashing margins on child elements.
172 > :first-child {
173 margin-top: 0;
174 }
175
176 > :last-child {
177 margin-bottom: 0;
178 }
179 }
180 }
181
182 // External links
183 // Use of `a` element selector for limiting generic class scope due to `.external` widespread usage.
184 .mw-parser-output {
185 a {
186 // Deal with long links (T327334, inspired by Minerva solution T62387)
187 word-wrap: break-word;
188 }
189
190 a.external {
191 // Use copy of Codex/OOUI WikimediaUI theme's 'linkExternal' icon in progressive color.
192 // Note that CSSJanus is flipping the `ltr` in the URL to `rtl`.
193 // Therefore make sure that both icons are available and up-to-date.
194 background-image: url( images/link-external-small-ltr-progressive.svg );
195 background-position: center right;
196 background-repeat: no-repeat;
197 // Equivalent of `12px` at calculation base of `14px` is `0.857em`.
198 background-size: 0.857em;
199 padding-right: 1em;
200
201 // See T330712 for better understanding of this class and any future changes.
202 &.free {
203 word-break: break-all;
204 }
205 }
206 }