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 12body { 13 // Support all browser: Remove the margin (opinionated). 14 margin: 0; 15} 16 17// Sectioning and grouping elements 18 19main { 20 // Support IE 9-11: Add the correct display. 21 display: block; 22} 23 24hr { 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 34abbr[ title ] { 35 border-bottom: 1px dotted; 36 cursor: help; 37} 38 39/* stylelint-disable-next-line plugin/no-unsupported-browser-features */ 40@supports ( text-decoration: underline dotted ) { 41 abbr[ title ] { 42 // Support Chrome 57- and Firefox 39-: Remove the bottom border. 43 border-bottom: 0; 44 // Support Chrome, Edge, IE, Opera, and Safari: Add the correct text decoration. 45 text-decoration: underline dotted; 46 } 47} 48 49pre, 50code, 51tt, 52kbd, 53samp { 54 // Support Blink, Gecko, Webkit: Correct the inheritance and scaling of font size 55 // in all browsers for monospace font. See T176636. 56 font-family: monospace, monospace; 57} 58 59sub, 60sup { 61 // Prevent citations and subscripts from interfering with the line height. 62 line-height: 1; 63} 64 65// Embedded content 66 67img { 68 // Support IE 8-10: Remove the border on images inside links. 69 border: 0; 70} 71 72// Forms and form elements 73 74button, 75input, 76optgroup, 77select, 78textarea { 79 // Support Firefox, Safari: Remove user-agent stylesheet `margin`. 80 margin: 0; 81} 82 83button::-moz-focus-inner, 84[ type='button' ]::-moz-focus-inner, 85[ type='reset' ]::-moz-focus-inner, 86[ type='submit' ]::-moz-focus-inner { 87 // Support Firefox: Remove the inner border and padding. 88 border-style: none; // stylelint-disable-line declaration-property-value-disallowed-list 89 padding: 0; 90} 91 92legend { 93 // Support IE: Correct the color inheritance from `fieldset` elements. 94 color: inherit; 95 // Support all browsers: Remove the padding so developers are not caught out when they 96 // zero out `fieldset` elements in all browsers. 97 padding: 0; 98} 99