- From: Jonas Sicking <jonas@sicking.cc>
- Date: Sat, 27 Sep 2014 17:06:37 -0700
- To: "www-style@w3.org" <www-style@w3.org>
Hi CSS WG, I was looking at the ins and outs (literally!) of "display: contents" since it's a feature I've been looking forward to for some time. I was surprised to see that "display: contents" maps to "display-inside: block". Does this mean that for something like: <p> This is <span>some <b>text</b> that</span> is rubbish. </p> <style> span { display: content; } </style> that the contents of the <p> element would not all lay out as inline? I realize that if you know that an element is going to be displayed in an inline context, that you could simply use "display: inline" rather than "display: content". However it seems useful to be able to create "transparent" elements that are always transparent, no matter which context they are used in. For example, it seems useful for authors to be able to style <form> elements as "display: content", and then use them inside inline text, to wrap several rows in a table, or to wrap a few blocks in a UI. I'm not sure if what's needed here is "display-inside: contents", or if "display-inside: auto" would have the same effect. But I think the goal should be that for layout purposes, "display: contents" should act exactly as if the element had been replaced by its children. / Jonas
Received on Sunday, 28 September 2014 00:07:33 UTC