Closed karlhorky closed 3 years ago
Going through this now, I’ll jot some notes down here:
ul[type]
— the default is not circle
, the default is based on CSS inheritanceautoComplete
:
form[autoComplete]
is a simple enum, so I added tagNames: 'form'
autoComplete
applies to: select, textarea, input[type=hidden,text,search,tel,url,email,password,date,month,week,time,datetime-local,number,range,color]
autoComplete
does not apply on: input[type=checkbox,radio,file,submit,image,reset,button]
on
and off
are not allowed on input[type=hidden]
input, select, textarea
, the default depends on the corresponding formautoComplete
on input, select, textarea
are so complex, I instead ignore them hereThanks! Went through most of these with a browser, to make sure the input and minified result are the same, for the DOM or as the visual result!
Amazing, thanks! 🙌
Subject of the feature
Copied from the comments in #36 https://github.com/rehypejs/rehype-minify/issues/36#issuecomment-749083406
Going through MDN and the HTML spec, found some more inconsistencies / additions:
missing
value forol[type]
should be'1'
missing
value forul[type]
should be'circle'
missing
value forform[target]
should be'_self'
[autocomplete]
: should this have an array oftagNames
? MDN says<input>
,<textarea>
,<select>
, and<form>
img[decoding]
: missing value default of'auto'
[loading]
should be ordered after[keytype]
and[kind]
[formmethod]
should have amissing
ofnull
(from the spec: "Theformmethod
attribute ... has no missing value default."). Maybe also change the comment to update the[method]
, because it isn't actually 100% synced...[formenctype]
should have amissing
ofnull
(from the spec: "Theformenctype
attribute ... has no missing value default."). Maybe also change the comment to update the[enctype]
, because it isn't actually 100% synced...[formtarget]
probably should have amissing
ofnull
(couldn't find it in the spec, but seems consistent with the others). Maybe also change the comment to update the[target]
, because it isn't actually 100% synced...li[type]
should maybe benull
instead? (from MDN: "This type overrides the one used by its parent<ol>
element, if any.")Problem
I'm trying to gather a list of "missing value defaults" for a new ESLint rule:
https://github.com/yannickcr/eslint-plugin-react/issues/2866
Also see https://github.com/rehypejs/rehype-minify/issues/36
Expected behavior
The list should be complete and correct.