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

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