2017-07-12 15:12:40 +00:00
|
|
|
// Headings in mobile
|
|
|
|
//
|
|
|
|
// All headings styled in the content div will be styled like so.
|
|
|
|
//
|
|
|
|
// Markup:
|
|
|
|
// <div class="pre-content">
|
2022-04-01 15:23:00 +00:00
|
|
|
// <h1 id="mw-first-heading">Heading 1</h1>
|
2017-07-12 15:12:40 +00:00
|
|
|
// </div>
|
|
|
|
// <div class="content">
|
|
|
|
// <p>Paragraph of text</p>
|
2022-11-16 14:04:22 +00:00
|
|
|
// <div class="mw-heading mw-heading2"><h2>Heading 2</h2></div>
|
2017-07-12 15:12:40 +00:00
|
|
|
// <p>Paragraph of text</p>
|
2022-11-16 14:04:22 +00:00
|
|
|
// <div class="mw-heading mw-heading3"><h3>Heading 3</h3></div>
|
2017-07-12 15:12:40 +00:00
|
|
|
// <p>Paragraph of text</p>
|
2022-11-16 14:04:22 +00:00
|
|
|
// <div class="mw-heading mw-heading4"><h4>Heading 4</h4></div>
|
2017-07-12 15:12:40 +00:00
|
|
|
// <p>Paragraph of text</p>
|
2022-11-16 14:04:22 +00:00
|
|
|
// <div class="mw-heading mw-heading5"><h5>Heading 2</h5></div>
|
2017-07-12 15:12:40 +00:00
|
|
|
// <p>Paragraph of text</p>
|
2022-11-16 14:04:22 +00:00
|
|
|
// <div class="mw-heading mw-heading6"><h6>Heading 2</h6></div>
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// </div>
|
|
|
|
//
|
|
|
|
// Alternative markup (pre-T13555):
|
|
|
|
// <div class="content">
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// <h2><span class="mw-headline">Heading 2</span></h2>
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// <h3><span class="mw-headline">Heading 3</span></h3>
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// <h4><span class="mw-headline">Heading 4</span></h4>
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// <h5><span class="mw-headline">Heading 2</span></h5>
|
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// <h6><span class="mw-headline">Heading 2</span></h6>
|
2017-07-12 15:12:40 +00:00
|
|
|
// <p>Paragraph of text</p>
|
|
|
|
// </div>
|
|
|
|
@import 'mediawiki.mixins.less';
|
2021-04-29 01:01:54 +00:00
|
|
|
@import '../../../minerva.less/minerva.variables.less';
|
|
|
|
@import '../../../minerva.less/minerva.mixins.less';
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2024-07-27 05:52:33 +00:00
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
2024-02-09 20:24:41 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
font: inherit;
|
|
|
|
}
|
|
|
|
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading1,
|
2017-07-12 15:12:40 +00:00
|
|
|
h1 {
|
2024-01-31 15:06:56 +00:00
|
|
|
font-size: @font-size-h1;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading2,
|
2017-07-12 15:12:40 +00:00
|
|
|
h2 {
|
2024-01-31 15:06:56 +00:00
|
|
|
font-size: @font-size-h2;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading3,
|
2017-07-12 15:12:40 +00:00
|
|
|
h3 {
|
2024-01-31 15:06:56 +00:00
|
|
|
font-size: @font-size-h3;
|
2017-07-12 15:12:40 +00:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading4,
|
2017-07-12 15:12:40 +00:00
|
|
|
h4 {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pre-content h1,
|
2022-11-16 14:04:22 +00:00
|
|
|
.content .mw-heading1,
|
2017-07-12 15:12:40 +00:00
|
|
|
.content h1,
|
2022-11-16 14:04:22 +00:00
|
|
|
.content .mw-heading2,
|
2017-07-12 15:12:40 +00:00
|
|
|
.content h2 {
|
2019-12-06 05:12:46 +00:00
|
|
|
font-family: @font-family-serif;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.pre-content h1,
|
2022-11-16 14:04:22 +00:00
|
|
|
.content .mw-heading1,
|
2017-07-12 15:12:40 +00:00
|
|
|
.content h1,
|
2022-11-16 14:04:22 +00:00
|
|
|
.content .mw-heading2,
|
2017-07-12 15:12:40 +00:00
|
|
|
.content h2,
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading3,
|
|
|
|
.mw-heading4,
|
|
|
|
.mw-heading5,
|
|
|
|
.mw-heading6,
|
2024-07-27 05:52:33 +00:00
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
2023-10-25 04:54:51 +00:00
|
|
|
line-height: @line-height-xx-small;
|
2017-07-12 15:12:40 +00:00
|
|
|
word-wrap: break-word;
|
|
|
|
|
|
|
|
// This value isn't valid per the specification [0] but fixes the behaviour in
|
|
|
|
// Google Chrome (45.0.2454.93), and, likely, other browsers too.
|
|
|
|
//
|
|
|
|
// [0] https://drafts.csswg.org/css-text-3/#propdef-word-break
|
|
|
|
word-break: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
// Deliberately not applied to h1
|
2022-11-16 14:04:22 +00:00
|
|
|
.mw-heading2,
|
|
|
|
.mw-heading3,
|
|
|
|
.mw-heading4,
|
|
|
|
.mw-heading5,
|
|
|
|
.mw-heading6,
|
2024-07-27 05:52:33 +00:00
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
2024-01-31 15:06:56 +00:00
|
|
|
padding: @margin-heading 0;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
2019-04-02 23:04:00 +00:00
|
|
|
|
|
|
|
// `h3`s need extra `margin-top` after paragraphs, see T219572.
|
2022-11-16 14:04:22 +00:00
|
|
|
p + .mw-heading3,
|
2019-04-02 23:04:00 +00:00
|
|
|
p + h3 {
|
2024-01-31 15:06:56 +00:00
|
|
|
margin-top: @margin-heading * 3;
|
2019-04-02 23:04:00 +00:00
|
|
|
}
|
2022-11-16 14:04:22 +00:00
|
|
|
|
|
|
|
// Override the styles above for `hN` nested inside `.mw-heading`, as used on wikitext pages.
|
|
|
|
.mw-heading {
|
2024-07-27 05:52:33 +00:00
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
2022-11-16 14:04:22 +00:00
|
|
|
font-size: inherit;
|
|
|
|
line-height: inherit;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|