[Bug 15954] [Shadow]: The dilemma of document DOM tree mutations

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15954

--- Comment #2 from Dimitri Glazkov <dglazkov@chromium.org> 2012-02-28 17:04:53 UTC ---
(In reply to comment #1)
> I don't think it's that bad to put a prefixed class or attribute in the light
> DOM.

It may create styles to start matching unexpectedly. For instance, if I already
had ".current" selector in my document making an element red and blinking with
"This Just In:" generated content before it, setting a current tab to
".current" will make it look just like it. An expected result, and on top of
that, since the component is encapsulating its logic, it's not knowable whether
this could happen.

> I think the only real alternative is to have some way of producing style rules
> directly in JS that don't need to serialize properly, so you can just *set* its
> target to an element rather than using the indirection of crafting a selector. 
> If you could do this in @select as well, you could cut out your whole indexOf
> thing.

Additionally, we could imagine a "classThatOnlyMatchesInsideContent" attribute
(needs better name!), which only matches as class when an element is
distributed by a <content> element.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 28 February 2012 17:05:01 UTC