You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some elements don't require opening tags if they don't have attributes (and their first child determines them uniquely in the context). Thus, I'd like to see an option "openings" that works just like the "endings" option.
In particular, <html>, <head> and <body> mostly are unnecessary if they have no attributes. (Yes, this is in the standard if you also do whitespace removal).
There are some other elements concerning tables where removing the opening element is allow (<colgroup>. <tbody>) that are more tricky to get them right (not preceeded by blargh), so they should not be included in the "all" option, which should mean [html, head, body].
The text was updated successfully, but these errors were encountered:
Thank you for the great suggestion. It’s easy to implement. I could do it in the November.
I’m not sure about the all shortcut. Even the head and body elements are tricky as shown in the second example of specs:
Note that in the example above, the head element start and end tags, and the body element start tag, can't be omitted, because they are surrounded by white space.
The average compress layout user doesn’t remove all white space. By just setting openings: all she would shoot herself in the foot.
Could you now live without the all shortcut?
After a while I could analyze how people use the new option and add the all shortcut as you proposed.
Of course I could live without the all shortcut. I would have expected that most users use the whitespace removal.
And actually the standard says that you cannot omit the <body> if the content of <body> starts with whitespace, because the whitespace would be considered part of the <head> then. You usually don't insist on the whitespace belonging to the <body> (that would only matter if you set body {white-space: pre; } via CSS). So even without the whitespaces removal, it would be sane to remove the opening tag. Even the validator doesn't complain if it is fed with
<!DOCTYPE html><title>Test</title><p>foo</p>
But, as stated above, if you think there should be no "all" option, that's fine with me too.
Some elements don't require opening tags if they don't have attributes (and their first child determines them uniquely in the context). Thus, I'd like to see an option "openings" that works just like the "endings" option.
In particular,
<html>
,<head>
and<body>
mostly are unnecessary if they have no attributes. (Yes, this is in the standard if you also do whitespace removal).There are some other elements concerning tables where removing the opening element is allow (
<colgroup>
.<tbody>
) that are more tricky to get them right (not preceeded by blargh), so they should not be included in the "all" option, which should mean[html, head, body]
.The text was updated successfully, but these errors were encountered: