Debian Codegraph @

skins/MinervaNeue/resources/skins.minerva.base.styles/content/headings.less

raw
1 // Headings in mobile
2 //
3 // All headings styled in the content div will be styled like so.
4 //
5 // Markup:
6 // <div class="pre-content">
7 // <h1 id="mw-first-heading">Heading 1</h1>
8 // </div>
9 // <div class="content">
10 // <p>Paragraph of text</p>
11 // <div class="mw-heading mw-heading2"><h2>Heading 2</h2></div>
12 // <p>Paragraph of text</p>
13 // <div class="mw-heading mw-heading3"><h3>Heading 3</h3></div>
14 // <p>Paragraph of text</p>
15 // <div class="mw-heading mw-heading4"><h4>Heading 4</h4></div>
16 // <p>Paragraph of text</p>
17 // <div class="mw-heading mw-heading5"><h5>Heading 2</h5></div>
18 // <p>Paragraph of text</p>
19 // <div class="mw-heading mw-heading6"><h6>Heading 2</h6></div>
20 // <p>Paragraph of text</p>
21 // </div>
22 //
23 // Alternative markup (pre-T13555):
24 // <div class="content">
25 // <p>Paragraph of text</p>
26 // <h2><span class="mw-headline">Heading 2</span></h2>
27 // <p>Paragraph of text</p>
28 // <h3><span class="mw-headline">Heading 3</span></h3>
29 // <p>Paragraph of text</p>
30 // <h4><span class="mw-headline">Heading 4</span></h4>
31 // <p>Paragraph of text</p>
32 // <h5><span class="mw-headline">Heading 2</span></h5>
33 // <p>Paragraph of text</p>
34 // <h6><span class="mw-headline">Heading 2</span></h6>
35 // <p>Paragraph of text</p>
36 // </div>
37 @import 'mediawiki.mixins.less';
38 @import '../../../minerva.less/minerva.variables.less';
39 @import '../../../minerva.less/minerva.mixins.less';
40
41 h1,
42 h2,
43 h3,
44 h4,
45 h5,
46 h6 {
47 margin: 0;
48 padding: 0;
49 font: inherit;
50 }
51
52 .mw-heading1,
53 h1 {
54 font-size: @font-size-h1;
55 }
56
57 .mw-heading2,
58 h2 {
59 font-size: @font-size-h2;
60 }
61
62 .mw-heading3,
63 h3 {
64 font-size: @font-size-h3;
65 font-weight: bold;
66 }
67
68 .mw-heading4,
69 h4 {
70 font-weight: bold;
71 }
72
73 .pre-content h1,
74 .content .mw-heading1,
75 .content h1,
76 .content .mw-heading2,
77 .content h2 {
78 font-family: @font-family-serif;
79 }
80
81 .pre-content h1,
82 .content .mw-heading1,
83 .content h1,
84 .content .mw-heading2,
85 .content h2,
86 .mw-heading3,
87 .mw-heading4,
88 .mw-heading5,
89 .mw-heading6,
90 h3,
91 h4,
92 h5,
93 h6 {
94 line-height: @line-height-xx-small;
95 word-wrap: break-word;
96
97 // This value isn't valid per the specification [0] but fixes the behaviour in
98 // Google Chrome (45.0.2454.93), and, likely, other browsers too.
99 //
100 // [0] https://drafts.csswg.org/css-text-3/#propdef-word-break
101 word-break: break-word;
102 }
103
104 .content {
105 // Deliberately not applied to h1
106 .mw-heading2,
107 .mw-heading3,
108 .mw-heading4,
109 .mw-heading5,
110 .mw-heading6,
111 h2,
112 h3,
113 h4,
114 h5,
115 h6 {
116 padding: @margin-heading 0;
117 }
118
119 // `h3`s need extra `margin-top` after paragraphs, see T219572.
120 p + .mw-heading3,
121 p + h3 {
122 margin-top: @margin-heading * 3;
123 }
124
125 // Override the styles above for `hN` nested inside `.mw-heading`, as used on wikitext pages.
126 .mw-heading {
127 h1,
128 h2,
129 h3,
130 h4,
131 h5,
132 h6 {
133 font-size: inherit;
134 line-height: inherit;
135 padding: 0;
136 margin: 0;
137 }
138 }
139 }