[whatwg] Transparent Content
Tab Atkins Jr.
jackalmage at gmail.com
Mon Oct 12 07:20:05 PDT 2009
On Mon, Oct 12, 2009 at 8:21 AM, Yuvalik Webdesign
<postmaster at yuvalik.org> wrote:
> I have an argument with a colleague of mine regarding Transparent elements. He filed a bug regarding this in bugzilla and I wrote to the html5doctor about it with a question, but neither action has answered our question.
> The way I understand it, a Transparent Element can contain the same elements its direct parent can. The way my colleague understands it, is that a transparent element can be wrapped around any other element.
> Which is it? Or is it something else?
> The section about Transparent Content (22.214.171.124) Is not very easy to understand, any chance it could be re-phrased? Specifically this sentence:
> “When a content model includes a part that is "transparent", those parts must not contain content that would not be conformant if all transparent elements in the tree were replaced, in their parent element, by the children in the "transparent" part of their content model, retaining order.”
> If I knew what it meant I would offer a suggestion, but I am at a loss as to understand this.
Neither of you are *quite* right, but you are much closer to correct
than your colleague. A transparent element *must* contain the same
kinds of elements that its direct parent can. The meaning of
transparent is simply that, if you removed the element but left its
children, the document would still be conforming.
It does *not* mean that you can wrap a transparent element around
anything, as some elements have very specific rules about what
children they may have. Frex, you can't wrap an arbitrary transparent
element around a <td>.
More information about the whatwg