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
{{ message }}
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
I propose to add new HTML element to spec: <container> (I had pick some name, but it could be other).
The idea is that <container> element would still be there in DOM, but it would be ignored when displaying document as if it contents was directly in place of <container>.
Example:
Also CSS selectors should ignore existence of <container>.
Selectors like: .form + .form or .parent > .form should match B and C div.
One could use <container> element as a parent for related elements, which could be detached and attached to DOM as a single element without inconvenience of having extra host element that could ruin Your layout.
This feature would also be helpful for library/framework developers who often simulate this behavior, usually with comments marking start and end of "container" block.
The text was updated successfully, but these errors were encountered:
Note that the CSS Display spec. already defines a contents value for display, which basically covers your use case of the container element not influencing the layout in any way.
Also, the <div> element already serves the use case of being a container element, even when it actually doesn't have a special meaning.
The selector "invisibility" part should rather be brought up in the CSSWG, though I guess the chances for this getting buy in from the implementors and spec. writers are relatively low, because that would mean some new selector logic, as all elements are selectable, so far.
Regarding detaching and attaching several sibling elements at once, the DocumentFragment interface and the Range.extractContents() method come in handy, without requiring a container element.
We're closing this issue on the W3C HTML specification because the W3C and WHATWG are now working together on HTML, and all issues are being discussed on the WHATWG repository.
If you filed this issue and you still think it is relevant, please open a new issue on the WHATWG repository and reference this issue (if there is useful information here). Before you open a new issue, please check for existing issues on the WHATWG repository to avoid duplication.
I propose to add new HTML element to spec:
<container>
(I had pick some name, but it could be other).The idea is that
<container>
element would still be there in DOM, but it would be ignored when displaying document as if it contents was directly in place of<container>
.Example:
should be displayed as:
Also CSS selectors should ignore existence of
<container>
.Selectors like:
.form + .form
or.parent > .form
should match B and C div.One could use
<container>
element as a parent for related elements, which could be detached and attached to DOM as a single element without inconvenience of having extra host element that could ruin Your layout.This feature would also be helpful for library/framework developers who often simulate this behavior, usually with comments marking start and end of "container" block.
The text was updated successfully, but these errors were encountered: