Debian Codegraph @

resources/src/mediawiki.skinning/normalize.less

raw
1 /**
2 * MediaWiki style sheet for addressing (normalizing) browser bugs and inconsistencies.
3 *
4 * Meant for normalizing elements and attribute selectors used by MediaWiki.
5 * General element styles and element-bound classes belong to 'elements.css'.
6 * If adding/changing rules, please consult https://github.com/necolas/normalize.css v7.0.0
7 * which this file is heavily inspired from, additionally orients on our
8 * Basic (Grade C) supported browsers.
9 * See https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix
10 */
11
12 body {
13 // Support all browser: Remove the margin (opinionated).
14 margin: 0;
15 }
16
17 // Sectioning and grouping elements
18
19 main {
20 // Support IE 9-11: Add the correct display.
21 display: block;
22 }
23
24 hr {
25 // Support Firefox: Add the correct box sizing.
26 box-sizing: content-box;
27 height: 0;
28 // Support Edge and IE: Show the overflow.
29 overflow: visible;
30 }
31
32 // Inline elements
33
34 abbr[ title ] {
35 border-bottom: 1px dotted;
36 cursor: help;
37 }
38
39 @supports ( text-decoration: underline dotted ) {
40 abbr[ title ] {
41 // Support Chrome 57- and Firefox 39-: Remove the bottom border.
42 border-bottom: 0;
43 // Support Chrome, Edge, IE, Opera, and Safari: Add the correct text decoration.
44 text-decoration: underline dotted;
45 }
46 }
47
48 pre,
49 code,
50 tt,
51 kbd,
52 samp {
53 // Support Blink, Gecko, Webkit: Correct the inheritance and scaling of font size
54 // in all browsers for monospace font. See T176636.
55 font-family: monospace, monospace;
56 }
57
58 sub,
59 sup {
60 // Prevent citations and subscripts from interfering with the line height.
61 line-height: 1;
62 }
63
64 // Embedded content
65
66 img {
67 // Support IE 8-10: Remove the border on images inside links.
68 border: 0;
69 }
70
71 figure {
72 // Figure elements tend to only appear inside wikitext rather than standaline,
73 // where existing margins already apply to the container element.
74 margin: 0;
75 }
76
77 // Forms and form elements
78
79 button,
80 input,
81 optgroup,
82 select,
83 textarea {
84 // Support Firefox, Safari: Remove user-agent stylesheet `margin`.
85 margin: 0;
86 }
87
88 button,
89 [ type='button' ],
90 [ type='reset' ],
91 [ type='submit' ] {
92 &::-moz-focus-inner {
93 // Support Firefox: Remove the inner border and padding.
94 border-style: none; // stylelint-disable-line declaration-property-value-disallowed-list
95 padding: 0;
96 }
97 }
98
99 legend {
100 // Support IE: Correct the color inheritance from `fieldset` elements.
101 color: inherit;
102 // Support all browsers: Remove the padding so developers are not caught out when they
103 // zero out `fieldset` elements in all browsers.
104 padding: 0;
105 }