W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

Re: [csswg-drafts] [css-display] Define interaction of display:contents and replaced elements

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 16 Mar 2017 17:24:00 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-287130661-1489685038-sysbot+gh@w3.org>
Again, `<video>` doesn't have fallback content; its children are *never* rendered or exposed in any way, in a browser that understands the element.  So it's a different case from all the others.

> I still think it's slightly confusing to have one layout rule for "native" shadow DOM (e.g., videos and complex form widgets) and another rule for custom web component shadow DOM, but that's consistent with them being very different from a DOM scripting perspective.

It's not even "one rule" for native shadows - `<details>` uses a native shadow, but it totally fine to just unwrap; it's not exotic in any way, and its box structure is consistent across browsers (it's just a shadow that pulls in the first summary child, then wraps all remaining content in a shadow div).  Form controls have totally different box structures across browsers, tho, and those structures aren't exposed to CSS's box tree.  

The rule is totally just "is there a reasonable box tree underneath the element, that can be exposed when we strip the wrapper".

All the replaced elements will get display:none regardless of whether they have fallback or not; the question is just what to do *when their fallback triggers*, and they stop being replaced.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/540#issuecomment-287130661 using your GitHub account
Received on Thursday, 16 March 2017 17:24:06 UTC

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