1/* 2 3Presentational hints stylsheet for HTML. 4 5This stylesheet contains all the presentational hints rules that can be 6expressed as CSS. 7 8See https://www.w3.org/TR/html5/rendering.html#rendering 9 10TODO: Attribute values are not case-insensitive, but they should be. We can add 11a "i" flag when CSS Selectors Level 4 is supported. 12 13*/ 14 15pre[wrap] { white-space: pre-wrap; } 16 17br[clear=left] { clear: left; } 18br[clear=right] { clear: right; } 19br[clear=all], br[clear=both] { clear: both; } 20 21ol[type=1], li[type=1] { list-style-type: decimal; } 22ol[type=a], li[type=a] { list-style-type: lower-alpha; } 23ol[type=A], li[type=A] { list-style-type: upper-alpha; } 24ol[type=i], li[type=i] { list-style-type: lower-roman; } 25ol[type=I], li[type=I] { list-style-type: upper-roman; } 26ul[type=disc], li[type=disc] { list-style-type: disc; } 27ul[type=circle], li[type=circle] { list-style-type: circle; } 28ul[type=square], li[type=square] { list-style-type: square; } 29 30table[align=left] { float: left; } 31table[align=right] { float: right; } 32table[align=center] { margin-left: auto; margin-right: auto; } 33thead[align=absmiddle], tbody[align=absmiddle], tfoot[align=absmiddle], 34tr[align=absmiddle], td[align=absmiddle], th[align=absmiddle] { 35 text-align: center; 36} 37 38caption[align=bottom] { caption-side: bottom; } 39p[align=left], h1[align=left], h2[align=left], h3[align=left], 40h4[align=left], h5[align=left], h6[align=left] { 41 text-align: left; 42} 43p[align=right], h1[align=right], h2[align=right], h3[align=right], 44h4[align=right], h5[align=right], h6[align=right] { 45 text-align: right; 46} 47p[align=center], h1[align=center], h2[align=center], h3[align=center], 48h4[align=center], h5[align=center], h6[align=center] { 49 text-align: center; 50} 51p[align=justify], h1[align=justify], h2[align=justify], h3[align=justify], 52h4[align=justify], h5[align=justify], h6[align=justify] { 53 text-align: justify; 54} 55thead[valign=top], tbody[valign=top], tfoot[valign=top], 56tr[valign=top], td[valign=top], th[valign=top] { 57 vertical-align: top; 58} 59thead[valign=middle], tbody[valign=middle], tfoot[valign=middle], 60tr[valign=middle], td[valign=middle], th[valign=middle] { 61 vertical-align: middle; 62} 63thead[valign=bottom], tbody[valign=bottom], tfoot[valign=bottom], 64tr[valign=bottom], td[valign=bottom], th[valign=bottom] { 65 vertical-align: bottom; 66} 67thead[valign=baseline], tbody[valign=baseline], tfoot[valign=baseline], 68tr[valign=baseline], td[valign=baseline], th[valign=baseline] { 69 vertical-align: baseline; 70} 71 72td[nowrap], th[nowrap] { white-space: nowrap; } 73 74table[rules=none], table[rules=groups], table[rules=rows], 75table[rules=cols], table[rules=all] { 76 border-style: hidden; 77 border-collapse: collapse; 78} 79table[border]:not([border="0"]) { border-style: outset; } 80table[frame=void] { border-style: hidden; } 81table[frame=above] { border-style: outset hidden hidden hidden; } 82table[frame=below] { border-style: hidden hidden outset hidden; } 83table[frame=hsides] { border-style: outset hidden outset hidden; } 84table[frame=lhs] { border-style: hidden hidden hidden outset; } 85table[frame=rhs] { border-style: hidden outset hidden hidden; } 86table[frame=vsides] { border-style: hidden outset; } 87table[frame=box], table[frame=border] { border-style: outset; } 88 89table[border]:not([border="0"]) > tr > td, table[border]:not([border="0"]) > tr > th, 90table[border]:not([border="0"]) > thead > tr > td, table[border]:not([border="0"]) > thead > tr > th, 91table[border]:not([border="0"]) > tbody > tr > td, table[border]:not([border="0"]) > tbody > tr > th, 92table[border]:not([border="0"]) > tfoot > tr > td, table[border]:not([border="0"]) > tfoot > tr > th { 93 border-width: 1px; 94 border-style: inset; 95} 96table[rules=none] > tr > td, table[rules=none] > tr > th, 97table[rules=none] > thead > tr > td, table[rules=none] > thead > tr > th, 98table[rules=none] > tbody > tr > td, table[rules=none] > tbody > tr > th, 99table[rules=none] > tfoot > tr > td, table[rules=none] > tfoot > tr > th, 100table[rules=groups] > tr > td, table[rules=groups] > tr > th, 101table[rules=groups] > thead > tr > td, table[rules=groups] > thead > tr > th, 102table[rules=groups] > tbody > tr > td, table[rules=groups] > tbody > tr > th, 103table[rules=groups] > tfoot > tr > td, table[rules=groups] > tfoot > tr > th, 104table[rules=rows] > tr > td, table[rules=rows] > tr > th, 105table[rules=rows] > thead > tr > td, table[rules=rows] > thead > tr > th, 106table[rules=rows] > tbody > tr > td, table[rules=rows] > tbody > tr > th, 107table[rules=rows] > tfoot > tr > td, table[rules=rows] > tfoot > tr > th { 108 border-width: 1px; 109 border-style: none; 110} 111table[rules=cols] > tr > td, table[rules=cols] > tr > th, 112table[rules=cols] > thead > tr > td, table[rules=cols] > thead > tr > th, 113table[rules=cols] > tbody > tr > td, table[rules=cols] > tbody > tr > th, 114table[rules=cols] > tfoot > tr > td, table[rules=cols] > tfoot > tr > th { 115 border-width: 1px; 116 border-style: none solid; 117} 118table[rules=all] > tr > td, table[rules=all] > tr > th, 119table[rules=all] > thead > tr > td, table[rules=all] > thead > tr > th, 120table[rules=all] > tbody > tr > td, table[rules=all] > tbody > tr > th, 121table[rules=all] > tfoot > tr > td, table[rules=all] > tfoot > tr > th { 122 border-width: 1px; 123 border-style: solid; 124} 125 126table[rules=groups] > colgroup { 127 border-left-width: 1px; 128 border-left-style: solid; 129 border-right-width: 1px; 130 border-right-style: solid; 131} 132table[rules=groups] > thead, 133table[rules=groups] > tbody, 134table[rules=groups] > tfoot { 135 border-top-width: 1px; 136 border-top-style: solid; 137 border-bottom-width: 1px; 138 border-bottom-style: solid; 139} 140 141table[rules=rows] > tr, table[rules=rows] > thead > tr, 142table[rules=rows] > tbody > tr, table[rules=rows] > tfoot > tr { 143 border-top-width: 1px; 144 border-top-style: solid; 145 border-bottom-width: 1px; 146 border-bottom-style: solid; 147} 148 149hr[align=left] { margin-left: 0; margin-right: auto; } 150hr[align=right] { margin-left: auto; margin-right: 0; } 151hr[align=center] { margin-left: auto; margin-right: auto; } 152hr[color], hr[noshade] { border-style: solid; } 153 154iframe[frameborder=0], iframe[frameborder=no] { border: none; } 155 156applet[align=left], embed[align=left], iframe[align=left], 157img[align=left], input[type=image][align=left], object[align=left] { 158 float: left; 159} 160 161applet[align=right], embed[align=right], iframe[align=right], 162img[align=right], input[type=image][align=right], object[align=right] { 163 float: right; 164} 165 166applet[align=top], embed[align=top], iframe[align=top], 167img[align=top], input[type=image][align=top], object[align=top] { 168 vertical-align: top; 169} 170 171applet[align=baseline], embed[align=baseline], iframe[align=baseline], 172img[align=baseline], input[type=image][align=baseline], object[align=baseline] { 173 vertical-align: baseline; 174} 175 176applet[align=texttop], embed[align=texttop], iframe[align=texttop], 177img[align=texttop], input[type=image][align=texttop], object[align=texttop] { 178 vertical-align: text-top; 179} 180 181applet[align=absmiddle], embed[align=absmiddle], iframe[align=absmiddle], 182img[align=absmiddle], input[type=image][align=absmiddle], object[align=absmiddle], 183applet[align=abscenter], embed[align=abscenter], iframe[align=abscenter], 184img[align=abscenter], input[type=image][align=abscenter], object[align=abscenter] { 185 vertical-align: middle; 186} 187 188applet[align=bottom], embed[align=bottom], iframe[align=bottom], 189img[align=bottom], input[type=image][align=bottom], 190object[align=bottom] { 191 vertical-align: bottom; 192} 193