W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [css-scoping] Clarification: behavior of `display: hidden` or `visibility: none` on a `slot` in a shadow tree

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 16 Jul 2018 22:21:11 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-405399578-1531779670-sysbot+gh@w3.org>
Assigning children to a slot happens regardless of the slot's style; it's a DOM-level process.  Displaying the children is determined by the slot's styles as normal; `display:none` on the slot should prevent it, or any of its assigned elements, from generating boxes.

So, modern browser behavior is correct. I suspect that previous behavior was from treating `slot` more magically, such that it actually gets replaced by its children, rather than the specced method of filling it with its children and then using `display:contents` to remove it at rendering time.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2903#issuecomment-405399578 using your GitHub account
Received on Monday, 16 July 2018 22:21:14 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:33 UTC