[Webkit-unassigned] [Bug 49142] Implement HTML5 style scoped attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 25 22:11:46 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=49142





--- Comment #14 from Roland Steiner <rolandsteiner at chromium.org>  2011-05-25 22:11:45 PST ---
(In reply to comment #13)
> Re comment 9, this feature is not intended to affect the cascade in any way other than changing which rules are in scope. The last sentence of comment 10 is correct. HTH.

Heh - this comment actually got me more confused ;). The spec says "... styles are intended just for the subtree rooted at the style element's parent element, as opposed to the whole Document."

I.e., I assumed selectors of scoped style-sheets match up to that style-sheet's parent, but not up to the document root. That would be another way (besides being in effect or not) how style resolution for scoped style rules would be different from document-wide style rules. E.g.

<div>
    <p>
        <style scoped>
            div span { color: red }
        </style>
        <span>Not actually red</span>
    </p>
</div>

In this case, the style would not match, because selector matching stops at <p>, while in the case where the only thing that changes is whether the style rules are in effect or not, it _would_ match.

Now the obvious follow-up question is whether a selector "p span" would match. From a strict reading I would guess yes, but that might be counter-intuitive.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list