Re: [CSS Regions] Update available

On Mar 25, 2011, at 3:25 PM, Arno Gourdol wrote:

> Hi Brady,
> 
>> "If the CSS selector has no matching element, the rule will be ignored until a matching element becomes available."
>> 
>> is really just saying "if the selector doesn't match anything then the selector doesn't match anything until the selector matches something." Isn't this just standard selector behavior?
> 
> This is probably not as clear as it could be. I think the intent here is to highlight the fact that the document tree could be modified subsequently (i.e. perhaps using a scripting language) and as a result a previously inapplicable rule would become applicable.

OK, I see now. Might want to clarify that. What happens if scripting removes an element that caused the match in the first place? So:

h1+p::slot() { ... }

With content:

[...]
<h1>A heading</h1>
<p>A paragraph</p>
[...]

And the h1 is removed? Would the resulting slot be removed? The more I read it, the more concerned I am about this "selection is creation" mechanic. How is order of creation specified, by appearance order in the document, specificity, or something else? How do you reference a slot that already exists? I guess it just makes me uneasy. Did that come up at the f2f? I'm sorry to say I am a little late to reviewing this as proposed to the CSS WG.

--Brady

Received on Friday, 25 March 2011 23:03:34 UTC