- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sun, 2 Dec 2012 12:49:19 -0800
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: François REMY <francois.remy.dev@outlook.com>, www-style list <www-style@w3.org>
On Sun, Dec 2, 2012 at 11:48 AM, L. David Baron <dbaron@dbaron.org> wrote: > On Sunday 2012-12-02 10:29 -0800, Tab Atkins Jr. wrote: >> On Sun, Dec 2, 2012 at 10:03 AM, François REMY >> <francois.remy.dev@outlook.com> wrote: >> > | On further though, if we do make that change, we'll still want a style >> > | attribute targetting a child to win over a scoped stylesheet scoped to >> > | that child, I think. >> > >> > Are you sure? Normally, a stylesheet always win to an attribute, right? Why >> > would we want to break that? >> >> I'm not sure I'm parsing you right, but a style attribute always beats >> a non-!important rule from a stylesheet. This is preserving that. >> >> In case my description wasn't clear, I was referring to something like this: >> >> <div style="> :first-child { color: green; }"> >> <p> >> <style scoped> :scope { color: red; } </style> >> foo >> </div> >> >> I think we want the text to be green. > > I'm not sure we want that style attribute feature at all (and I > wasn't thinking about it earlier in this thread). > > But if we do, I'd want the text to be red, because the scope of the > <style scoped> is inside the scope of the style attribute. > > In other words, I'd want the style attribute's cascading rules to be > defined in terms of scope. I could do it that way instead, sure. They're equally easy to spec. I assume that in the following the text should be green? <p style="color: green;"> <style scoped>:scope { color: red; }</style> foo </p> In other words, style attributes are scoped "more tightly" than a scoped stylesheet? ~TJ
Received on Sunday, 2 December 2012 20:50:09 UTC