Debian Codegraph @

resources/src/mediawiki.skinning/content.body.less

raw
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.skin.variables.less';
23 @import 'mediawiki.mixins.less';
24
25 /**
26 * It's possible to add HTML elements inside wikitext, for example <div style="float:right;"></div>
27 * Editors have grown to expect that any floated elements added inside wikitext will be cleared
28 * automatically by the skin. This rule encapsulates that user expectation in a central place that
29 * applies to all skins.
30 * Note, this applies to mw-body-content not mw-parser-output as on pages such as the category page,
31 * the body of a page includes other sibling elements aside from the output of the parser.
32 */
33 .mw-body-content {
34 .mixin-clearfix();
35
36 a.external.free {
37 word-wrap: break-word;
38 }
39
40 // error is a class outputted by the parser,
41 // when transcluding a page on itself, for example.
42 .error {
43 font-size: larger;
44 color: @color-error;
45 }
46 }
47
48 /* External URLs should always be treated as LTR (T6330) */
49 /* @noflip */ .rtl .mw-parser-output a.external.free,
50 .rtl .mw-parser-output a.external.autonumber {
51 direction: ltr;
52 unicode-bidi: embed;
53 }
54
55 // Hide elements that are marked as "empty" according to legacy Tidy rules,
56 // except if a client script removes the `.mw-hide-empty-elt` class from the body.
57 // Allow individual parser-output blocks to show empty elements using `.mw-show-empty-elt`,
58 // for example an editing interface. (T295984)
59 /* body */ .mw-hide-empty-elt .mw-parser-output:not( .mw-show-empty-elt ) .mw-empty-elt {
60 display: none;
61 }