aboutsummaryrefslogtreecommitdiffstats
path: root/resources/presentational-hints.css
blob: 36a0175bd45cda481b6d0cf4e0f2647e043af946 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/*
https://html.spec.whatwg.org/multipage/#presentational-hints
*/

@namespace url(http://www.w3.org/1999/xhtml);


pre[wrap] { white-space: pre-wrap; }

div[align=left i] { text-align: -moz-left; }
div[align=right i] { text-align: -moz-right; }
div[align=center i], div[align=middle i] { text-align: -moz-center; }
div[align=justify i] { text-align: justify; }


br[clear=left i] { clear: left; }
br[clear=right i] { clear: right; }
br[clear=all i], br[clear=both i] { clear: both; }


ol[type="1"], li[type="1"] { list-style-type: decimal; }
ol[type=a s], li[type=a s] { list-style-type: lower-alpha; }
ol[type=A s], li[type=A s] { list-style-type: upper-alpha; }
ol[type=i s], li[type=i s] { list-style-type: lower-roman; }
ol[type=I s], li[type=I s] { list-style-type: upper-roman; }
ul[type=none i], li[type=none i] { list-style-type: none; }
ul[type=disc i], li[type=disc i] { list-style-type: disc; }
ul[type=circle i], li[type=circle i] { list-style-type: circle; }
ul[type=square i], li[type=square i] { list-style-type: square; }


table[align=left i] { float: left; }
table[align=right i] { float: right; }
table[align=center i] { margin-left: auto; margin-right: auto; }
:matches(thead, tbody, tfoot, tr, td, th)[align=absmiddle i] {
  text-align: center;
}

caption[align=bottom i] { caption-side: bottom; }
p[align=left i], h1[align=left i], h2[align=left i], h3[align=left i], h4[align=left i], h5[align=left i], h6[align=left i] { text-align: left; }
p[align=right i], h1[align=right i], h2[align=right i], h3[align=right i], h4[align=right i], h5[align=right i], h6[align=right i] { text-align: right; }
p[align=center i], h1[align=center i], h2[align=center i], h3[align=center i], h4[align=center i], h5[align=center i], h6[align=center i] { text-align: center; }
p[align=justify i], h1[align=justify i], h2[align=justify i], h3[align=justify i], h4[align=justify i], h5[align=justify i], h6[align=justify i] { text-align: justify; }
thead[valign=top i], tbody[valign=top i], tfoot[valign=top i], tr[valign=top i], td[valign=top i], th[valign=top i] { vertical-align: top; }
thead[valign=middle i], tbody[valign=middle i], tfoot[valign=middle i], tr[valign=middle i], td[valign=middle i], th[valign=middle i] { vertical-align: middle; }
thead[valign=bottom i], tbody[valign=bottom i], tfoot[valign=bottom i], tr[valign=bottom i], td[valign=bottom i], th[valign=bottom i] { vertical-align: bottom; }
thead[valign=baseline i], tbody[valign=baseline i], tfoot[valign=baseline i], tr[valign=baseline i], td[valign=baseline i], th[valign=baseline i] { vertical-align: baseline; }

td[nowrap], th[nowrap] { white-space: nowrap; }

table[rules=none i], table[rules=groups i], table[rules=rows i], table[rules=cols i], table[rules=all i] {
  border-style: hidden;
  border-collapse: collapse;
}

table:-servo-nonzero-border {
  border-style: outset;
}
table[frame=void i] { border-style: hidden; }
table[frame=above i] { border-style: outset hidden hidden hidden; }
table[frame=below i] { border-style: hidden hidden outset hidden; }
table[frame=hsides i] { border-style: outset hidden outset hidden; }
table[frame=lhs i] { border-style: hidden hidden hidden outset; }
table[frame=rhs i] { border-style: hidden outset hidden hidden; }
table[frame=vsides i] { border-style: hidden outset; }
table[frame=box i], table[frame=border i] { border-style: outset; }


table:-servo-nonzero-border > tr > td,
table:-servo-nonzero-border > tr > th,
table:-servo-nonzero-border > thead > tr > td,
table:-servo-nonzero-border > thead > tr > th,
table:-servo-nonzero-border > tbody > tr > td,
table:-servo-nonzero-border > tbody > tr > th,
table:-servo-nonzero-border > tfoot > tr > td,
table:-servo-nonzero-border > tfoot > tr > th {
  border-width: 1px;
  border-style: inset;
}

table[rules=none i] > tr > td, table[rules=groups i] > tr > td, table[rules=rows i] > tr > td, table[rules=none i] > tr > th, table[rules=groups i] > tr > th, table[rules=rows i] > tr > th,
table[rules=none i] > thead > tr > td, table[rules=groups i] > thead > tr > td, table[rules=rows i] > thead > tr > td, table[rules=none i] > thead > tr > th, table[rules=groups i] > thead > tr > th, table[rules=rows i] > thead > tr > th,
table[rules=none i] > tbody > tr > td, table[rules=groups i] > tbody > tr > td, table[rules=rows i] > tbody > tr > td, table[rules=none i] > tbody > tr > th, table[rules=groups i] > tbody > tr > th, table[rules=rows i] > tbody > tr > th,
table[rules=none i] > tfoot > tr > td, table[rules=groups i] > tfoot > tr > td, table[rules=rows i] > tfoot > tr > td, table[rules=none i] > tfoot > tr > th, table[rules=groups i] > tfoot > tr > th, table[rules=rows i] > tfoot > tr > th {
  border-width: 1px;
  border-style: none;
}
table[rules=cols i] > tr > td, table[rules=cols i] > tr > th,
table[rules=cols i] > thead > tr > td, table[rules=cols i] > thead > tr > th,
table[rules=cols i] > tbody > tr > td, table[rules=cols i] > tbody > tr > th,
table[rules=cols i] > tfoot > tr > td, table[rules=cols i] > tfoot > tr > th {
  border-width: 1px;
  border-style: none solid;
}
table[rules=all i] > tr > td, table[rules=all i] > tr > th,
table[rules=all i] > thead > tr > td, table[rules=all i] > thead > tr > th,
table[rules=all i] > tbody > tr > td, table[rules=all i] > tbody > tr > th,
table[rules=all i] > tfoot > tr > td, table[rules=all i] > tfoot > tr > th {
  border-width: 1px;
  border-style: solid;
}

table[rules=groups i] > colgroup {
  border-left-width: 1px;
  border-left-style: solid;
  border-right-width: 1px;
  border-right-style: solid;
}
table[rules=groups i] > tr,
table[rules=groups i] > thead > tr,
table[rules=groups i] > tbody > tr,
table[rules=groups i] > tfoot > tr {
  border-top-width: 1px;
  border-top-style: solid;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
table[rules=rows i] > tr,
table[rules=rows i] > thead > tr,
table[rules=rows i] > tbody > tr,
table[rules=rows i] > tfoot > tr {
  border-top-width: 1px;
  border-top-style: solid;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}


hr[align=left] { margin-left: 0; margin-right: auto; }
hr[align=right] { margin-left: auto; margin-right: 0; }
hr[align=center] { margin-left: auto; margin-right: auto; }
hr[color], hr[noshade] { border-style: solid; }



iframe[frameborder="0"], iframe[frameborder=no i] { border: none; }

embed[align=left i], iframe[align=left i], img[type=image i][align=left i], object[align=left i] {
  float: left;
}
embed[align=right i], iframe[align=right i], img[type=image i][align=right i], object[align=right i] {
  float: right;
}
embed[align=top i], iframe[align=top i], img[type=image i][align=top i], object[align=top i] {
  vertical-align: top;
}
embed[align=baseline i], iframe[align=baseline i], img[type=image i][align=baseline i], object[align=baseline i] {
  vertical-align: baseline;
}
embed[align=texttop i], iframe[align=texttop i], img[type=image i][align=texttop i], object[align=texttop i] {
  vertical-align: text-top;
}
embed[align=absmiddle i], iframe[align=absmiddle i], img[type=image i][align=absmiddle i], object[align=absmiddle i],
embed[align=abscenter i], iframe[align=abscenter i], img[type=image i][align=abscenter i], object[align=abscenter i] {
  vertical-align: middle;
}
embed[align=bottom i], iframe[align=bottom i], img[type=image i][align=bottom i], object[align=bottom i] {
  vertical-align: bottom;
}
/*
FIXME:
:matches(embed, iframe, img, input[type=image i], object):matches([align=center i], [align=middle i]) {
  vertical-align: "aligns the vertical middle of the element with the parent element's baseline."
}
*/

/*

Presentational attributes which can not currently be expressed in CSS.
FIXME: Deal with them with attr(foo dimension) and the like?

body
  marginheight
  marginwidth
  topmargin
  rightmargin
  bottommargin
  leftmargin
  background
  bgcolor
  text
  link
  vlink
  alink

frame, iframe
  marginheight
  marginwidth

font
  face
  color
  size

table
  cellspacing
  cellpadding
  hspace
  vspace
  height
  width
  bordercolor
  border

col
  width

tr
  height

td, th
  width
  height

caption, thead, tbody, tfoot, tr, td, and th
  align

table, thead, tbody, tfoot, tr, td, or th
  background
  bgcolor

(quirks mode) th, td
  nowrap

hr
  color
  noshade
  size
  width

legend
  align

embed, iframe, img, input[type=image i], object
  hspace
  vspace

img, input[type=image i], object
  border

embed, iframe, img, input[type=image i], object, video
  width
  height

*/

/*

Extra
  ol > li
    https://html.spec.whatwg.org/multipage/#ordinal-value
  col
    span
  colgroup (if not col child)
    span
  td, th
    colspan
    rowspan

  :computed-value(text-align is initial) > th {
    text-align: center;
  }

  https://html.spec.whatwg.org/multipage/#rendered-legend

*/