aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src/mediawiki.skinning/normalize.less
blob: 0d9e073f4e64b067da7d8c53d6e9d709615760f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
 * MediaWiki style sheet for addressing (normalizing) browser bugs and inconsistencies.
 *
 * Meant for normalizing elements and attribute selectors used by MediaWiki.
 * General element styles and element-bound classes belong to 'elements.css'.
 * If adding/changing rules, please consult https://github.com/necolas/normalize.css v7.0.0
 * which this file is heavily inspired from, additionally orients on our
 * Basic (Grade C) supported browsers.
 * See https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix
 */

body {
	// Support all browser: Remove the margin (opinionated).
	margin: 0;
}

// Sectioning and grouping elements

hr {
	// Support Firefox: Add the correct box sizing.
	box-sizing: content-box;
	height: 0;
	// Support Edge and IE: Show the overflow.
	overflow: visible;
}

// Inline elements

abbr[ title ] {
	border-bottom: 1px dotted;
	cursor: help;
}

@supports ( text-decoration: underline dotted ) {
	abbr[ title ] {
		// Support Chrome 57- and Firefox 39-: Remove the bottom border.
		border-bottom: 0;
		// Support Chrome, Edge, IE, Opera, and Safari: Add the correct text decoration.
		text-decoration: underline dotted;
	}
}

pre,
code,
tt,
kbd,
samp {
	// Support Blink, Gecko, Webkit: Correct the inheritance and scaling of font size
	// in all browsers for monospace font. See T176636.
	font-family: monospace, monospace;
}

sub,
sup {
	// Prevent citations and subscripts from interfering with the line height.
	line-height: 1;
}

// Embedded content

figure {
	// Figure elements tend to only appear inside wikitext rather than standaline,
	// where existing margins already apply to the container element.
	margin: 0;
}

// Forms and form elements

button,
input,
optgroup,
select,
textarea {
	// Support Firefox, Safari: Remove user-agent stylesheet `margin`.
	margin: 0;
}

button,
[ type='button' ],
[ type='reset' ],
[ type='submit' ] {
	&::-moz-focus-inner {
		// Support Firefox: Remove the inner border and padding.
		border-style: none; // stylelint-disable-line declaration-property-value-disallowed-list
		padding: 0;
	}
}

legend {
	// Support all browsers: Remove the padding so developers are not caught out when they
	// zero out `fieldset` elements in all browsers.
	padding: 0;
}