Skip to content

Commit 212deff

Browse files
committed
fix(obsoletes): update obsolete attributes selector to match WHATWG spec
1 parent 1cd63ee commit 212deff

File tree

1 file changed

+67
-49
lines changed

1 file changed

+67
-49
lines changed

sass/themes/_obsolete.scss

Lines changed: 67 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -104,36 +104,21 @@ Many, many attributes are obsolete in HTML5. You should care!
104104
### Selector
105105
```css
106106
[dropzone],
107+
[contextmenu],
108+
[onshow],
107109
a[charset], link[charset],
108110
a[coords],
109111
a[shape],
110112
a[methods], link[methods],
111-
a[name], embed[name], img[name], option[name],
113+
a[name], option[name], embed[name], img[name],
112114
a[rev], link[rev],
113115
a[urn], link[urn],
114116
form[accept],
115-
area[nohref],
116-
area[type],
117-
area[hreflang],
118117
head[profile],
119118
html[version],
120-
input[ismap],
121-
input[usemap],
122-
input[inputmode],
123-
iframe[longdesc], img[longdesc],
124-
img[lowsrc],
125119
link[target],
126-
meta[scheme],
127-
meta[http-equiv="content-language"],
128-
meta[http-equiv="content-type"],
129-
meta[http-equiv="set-cookie"],
130-
object[archive],
131-
object[classid],
132-
object[code],
133-
object[codebase],
134-
object[codetype],
135-
object[declare],
136-
object[standby],
120+
menu[type],
121+
menu[label],
137122
param[type],
138123
param[valuetype],
139124
script[language],
@@ -144,45 +129,77 @@ table[summary],
144129
td[axis], th[axis],
145130
td[scope],
146131
td[abbr],
147-
a[datasrc], applet[datasrc], button[datasrc], div[datasrc], frame[datasrc], iframe[datasrc], img[datasrc], input[datasrc], label[datasrc], legend[datasrc], marquee[datasrc], object[datasrc], option[datasrc], select[datasrc], span[datasrc], table[datasrc], textarea[datasrc],
148-
a[datafld], applet[datafld], button[datafld], div[datafld], fieldset[datafld], frame[datafld], iframe[datafld], img[datafld], input[datafld], label[datafld], legend[datafld], marquee[datafld], object[datafld], param[datafld], select[datafld], span[datafld], textarea[datafld],
149-
button[dataformatas], div[dataformatas], input[dataformatas], label[dataformatas], legend[dataformatas], marquee[dataformatas], object[dataformatas], option[dataformatas], select[dataformatas], span[dataformatas], table[dataformatas],
132+
a[datasrc], applet[datasrc], button[datasrc], div[datasrc], frame[datasrc], label[datasrc], legend[datasrc], marquee[datasrc], option[datasrc], span[datasrc], table[datasrc],
133+
a[datafld], applet[datafld], button[datafld], div[datafld], fieldset[datafld], frame[datafld], label[datafld], legend[datafld], marquee[datafld], param[datafld], span[datafld],
134+
button[dataformatas], div[dataformatas], label[dataformatas], legend[dataformatas], marquee[dataformatas], option[dataformatas], span[dataformatas], table[dataformatas],
150135
body[alink],
151136
body[bgcolor], table[bgcolor], td[bgcolor], th[bgcolor], tr[bgcolor],
152137
body[link],
153-
body[marginbottom],
154-
body[marginheight], iframe[marginheight],
155-
body[marginleft],
156-
body[marginright],
157-
body[margintop],
158-
body[marginwidth], iframe[marginwidth],
138+
body[bottommargin],
139+
body[leftmargin],
140+
body[rightmargin],
141+
body[topmargin],
142+
body[marginheight],
143+
body[marginwidth],
159144
body[text],
160145
body[vlink],
161-
br[clear],
162146
col[char], tbody[char], thead[char], tfoot[char], td[char], th[char], tr[char],
163147
col[charoff], tbody[charoff], thead[charoff], tfoot[charoff], td[charoff], th[charoff], tr[charoff],
164148
col[valign], tbody[valign], thead[valign], tfoot[valign], td[valign], th[valign], tr[valign],
165-
col[width], hr[width], pre[width], table[width], td[width], th[width],
149+
col[width], pre[width], table[width], td[width], th[width],
166150
dl[compact], ol[compact], ul[compact],
151+
h1[align], h2[align], h3[align], h4[align], h5[align], h6[align], caption[align], col[align], div[align], legend[align], p[align], table[align], tbody[align], thead[align], tfoot[align], td[align], th[align], tr[align],
152+
li[type], ul[type],
153+
table[cellpadding],
154+
table[cellspacing],
155+
table[frame],
156+
table[rules],
157+
td[height], th[height],
158+
td[nowrap], th[nowrap],
159+
body[background], table[background], thead[background], tbody[background], tfoot[background], tr[background], td[background], th[background],
160+
// Self-closing tags
161+
embed[name], img[name],
162+
area[nohref],
163+
area[type],
164+
area[hreflang],
165+
input[ismap],
166+
input[usemap],
167+
iframe[longdesc], img[longdesc],
168+
img[lowsrc],
169+
object[archive],
170+
object[classid],
171+
object[code],
172+
object[codebase],
173+
object[codetype],
174+
object[declare],
175+
object[standby],
176+
object[typemustmatch],
177+
iframe[datasrc], img[datasrc], input[datasrc],object[datasrc], select[datasrc], textarea[datasrc],
178+
iframe[datafld], img[datafld], input[datafld], object[datafld], select[datafld], textarea[datafld],
179+
input[dataformatas], object[dataformatas], select[dataformatas],
180+
iframe[marginheight],
181+
iframe[marginwidth],
182+
br[clear],
183+
hr[width],
167184
embed[hspace], iframe[hspace], input[hspace], img[hspace], object[hspace],
168185
embed[vspace], iframe[vspace], input[vspace], img[vspace], object[vspace],
169186
hr[color],
170187
hr[noshade],
171188
hr[size],
172-
h1[align], h2[align], h3[align], h4[align], h5[align], h6[align], iframe[align], caption[align], col[align], div[align], embed[align], hr[align], input[align], img[align], legend[align], object[align], p[align], table[align], tbody[align], thead[align], tfoot[align], td[align], th[align], tr[align],
189+
iframe[align], embed[align], hr[align], input[align], img[align], object[align],
173190
iframe[allowtransparency],
174191
iframe[frameborder],
175192
iframe[framespacing],
176193
iframe[scrolling],
177194
img[border], object[border],
178-
li[type], ul[type],
179-
table[cellpadding],
180-
table[cellspacing],
181-
table[frame],
182-
table[rules],
183-
td[height], th[height],
184-
td[nowrap], th[nowrap],
185-
body[background], table[background], thead[background], tbody[background], tfoot[background], tr[background], td[background], th[background]
195+
// Tags in head
196+
link[charset], link[methods],
197+
link[rev], link[urn],
198+
link[target],
199+
meta[scheme],
200+
script[language],
201+
script[event],
202+
script[for]
186203
```
187204
188205
### Test
@@ -191,6 +208,8 @@ body[background], table[background], thead[background], tbody[background], tfoot
191208
```
192209
*/
193210
[dropzone],
211+
[contextmenu],
212+
[onshow],
194213
a[charset], link[charset],
195214
a[coords],
196215
a[shape],
@@ -202,6 +221,8 @@ form[accept],
202221
head[profile],
203222
html[version],
204223
link[target],
224+
menu[type],
225+
menu[label],
205226
param[type],
206227
param[valuetype],
207228
script[language],
@@ -218,11 +239,11 @@ button[dataformatas], div[dataformatas], label[dataformatas], legend[dataformata
218239
body[alink],
219240
body[bgcolor], table[bgcolor], td[bgcolor], th[bgcolor], tr[bgcolor],
220241
body[link],
221-
body[marginbottom],
242+
body[bottommargin],
243+
body[leftmargin],
244+
body[rightmargin],
245+
body[topmargin],
222246
body[marginheight],
223-
body[marginleft],
224-
body[marginright],
225-
body[margintop],
226247
body[marginwidth],
227248
body[text],
228249
body[vlink],
@@ -258,6 +279,7 @@ object[codebase],
258279
object[codetype],
259280
object[declare],
260281
object[standby],
282+
object[typemustmatch],
261283
iframe[datasrc], img[datasrc], input[datasrc],object[datasrc], select[datasrc], textarea[datasrc],
262284
iframe[datafld], img[datafld], input[datafld], object[datafld], select[datafld], textarea[datafld],
263285
input[dataformatas], object[dataformatas], select[dataformatas],
@@ -275,18 +297,14 @@ iframe[allowtransparency],
275297
iframe[frameborder],
276298
iframe[framespacing],
277299
iframe[scrolling],
278-
img[border], object[border],
279-
input[inputmode] {
300+
img[border], object[border] {
280301
@include obsolete('attributes', $self-closing: true);
281302
}
282303

283304
link[charset], link[methods],
284305
link[rev], link[urn],
285306
link[target],
286307
meta[scheme],
287-
meta[http-equiv="content-language"],
288-
meta[http-equiv="content-type"],
289-
meta[http-equiv="set-cookie"],
290308
script[language],
291309
script[event],
292310
script[for] {

0 commit comments

Comments
 (0)