- From: L. David Baron <dbaron@dbaron.org>
- Date: Sun, 2 Dec 2012 11:48:55 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: François REMY <francois.remy.dev@outlook.com>, www-style list <www-style@w3.org>
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.
-David
--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Sunday, 2 December 2012 19:49:21 UTC