1/* stylelint-disable selector-class-pattern */
2
3/**
4 * NOTE: This feature is enabled for all skins. Please read the instructions below before adding anything
5 * new to this file.
6 *
7 * This feature provides various styles associated with the body content of an article.
8 * The article body is considered to be anything that can be generated by OutputPage::getHTML()
9 * that is (or could be considered) universal to all pages in the main namespace.
10 *
11 * It is expected that this HTML is wrapped by SkinTemplate::wrapHTML and that the wrapping
12 * element makes use of the `mw-body-content` class.
13 *
14 * All styles here should be be scoped to the `.mw-body-content` or one of its child class
15 * e.g. `mw-parser-output class` where more appropriate.
16 *
17 * Styles here should be limited to CSS classes generated by PHP code inside MediaWiki core.
18 * Classes added that require an on-wiki template in the Template space and cannot be reproduced
19 * with a vanilla MediaWiki install are not allowed here. Please use MediaWiki:Common.css and
20 * MediaWiki:<skin>.css for such styles.
21 */
22@import 'mediawiki.mixins.less';
23
24/**
25 * It's possible to add HTML elements inside wikitext, for example <div style="float:right;"></div>
26 * Editors have grown to expect that any floated elements added inside wikitext will be cleared
27 * automatically by the skin. This rule encapsulates that user expectation in a central place that
28 * applies to all skins.
29 * Note, this applies to mw-body-content not mw-parser-output as on pages such as the category page,
30 * the body of a page includes other sibling elements aside from the output of the parser.
31 */
32.mw-body-content {
33	.mixin-clearfix();
34
35	a.external.free {
36		word-wrap: break-word;
37	}
38
39	// error is a class outputted by the parser,
40	// when transcluding a page on itself, for example.
41	.error {
42		font-size: larger;
43		color: #d33;
44	}
45}
46
47/* External URLs should always be treated as LTR (T6330) */
48/* @noflip */ .rtl .mw-parser-output a.external.free,
49.rtl .mw-parser-output a.external.autonumber {
50	direction: ltr;
51	unicode-bidi: embed;
52}
53
54// Hide elements that are marked as "empty" according to legacy Tidy rules,
55// except if a client script removes the `.mw-hide-empty-elt` class from the body.
56/* body */ .mw-hide-empty-elt .mw-parser-output .mw-empty-elt {
57	display: none;
58}
59