resets.html (3300B)
1 <!doctype html> 2 <title>default style resets</title> 3 <meta name="viewport" content="width=device-width"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/html/rendering/support/test-ua-stylesheet.js"></script> 7 <style> 8 /* Have some non-initial values on the parent so we can tell the difference whether the UA stylesheet uses 'initial' keyword. */ 9 #tests, #refs { 10 letter-spacing: 5px; 11 word-spacing: 5px; 12 line-height: 5px; 13 text-transform: uppercase; 14 text-indent: 5px; 15 text-shadow: 0 0 5px transparent; 16 text-align: right; 17 } 18 </style> 19 <style> 20 /* Specify this bogus namespace, so the rules in this stylesheet only apply to the `fakeClone`d elements in #refs, not the HTML elements in #tests. */ 21 @namespace url(urn:not-html); 22 23 input, select, button, textarea { 24 letter-spacing: initial; 25 word-spacing: initial; 26 line-height: initial; 27 text-transform: initial; 28 text-indent: initial; 29 text-shadow: initial; 30 } 31 input, select, textarea { 32 text-align: initial; 33 } 34 input[type=reset i], input[type=button i], input[type=submit i], button { 35 text-align: center; 36 } 37 input[type=radio i], input[type=checkbox i], input[type=reset i], input[type=button i], 38 input[type=submit i], input[type=color i], input[type=search i], select, button { 39 box-sizing: border-box; 40 } 41 input, button { 42 display: inline-block; 43 } 44 input:not([type=image i], [type=range i], [type=checkbox i], [type=radio i]) { 45 overflow: clip; 46 overflow-clip-margin: 0; 47 } 48 /* in spec prose: */ select, textarea, meter, progress { 49 display: inline-block; 50 } 51 input[type=hidden i] { display: none !important; } 52 marquee { 53 overflow: hidden; 54 text-align: initial; 55 } 56 table { display: table; box-sizing: border-box; } 57 caption { display: table-caption; } 58 colgroup, colgroup[hidden] { display: table-column-group; } 59 col, col[hidden] { display: table-column; } 60 thead, thead[hidden] { display: table-header-group; } 61 tbody, tbody[hidden] { display: table-row-group; } 62 tfoot, tfoot[hidden] { display: table-footer-group; } 63 tr, tr[hidden] { display: table-row; } 64 td, th { display: table-cell; } 65 table { 66 text-indent: initial; 67 } 68 </style> 69 70 <div id="tests"> 71 <input type="hidden"> 72 <input type="text"> 73 <input type="search"> 74 <input type="tel"> 75 <input type="url"> 76 <input type="email"> 77 <input type="password"> 78 <input type="date"> 79 <input type="month"> 80 <input type="week"> 81 <input type="time"> 82 <input type="datetime-local"> 83 <input type="number"> 84 <input type="range"> 85 <input type="color"> 86 <input type="checkbox"> 87 <input type="radio"> 88 <input type="file"> 89 <input type="submit"> 90 <input type="image"> 91 <input type="reset"> 92 <input type="button"> 93 <select><optgroup><option></select> 94 <select multiple></select> 95 <optgroup></optgroup> 96 <option></option> 97 <button></button> 98 <textarea></textarea> 99 <table><tbody><tr><td></table> 100 <marquee></marquee> 101 </div> 102 103 <div id="refs"></div> 104 105 <script> 106 const props = ['letter-spacing', 107 'word-spacing', 108 'line-height', 109 'text-transform', 110 'text-indent', 111 'text-shadow', 112 'text-align', 113 'display', 114 'overflow', 115 'overflow-clip-margin', 116 'box-sizing']; 117 runUAStyleTests(props); 118 119 </script>