W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: [css3-cascade] style attribute should override scoped style sheets

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 2 Dec 2012 10:29:10 -0800
Message-ID: <CAAWBYDCgm8BWrWg5ZTrGEf4qU+CE2vGEWtgh4F7fRjQFes9qqw@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
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; }">
    <style scoped> :scope { color: red; } </style>

I think we want the text to be green.

Received on Sunday, 2 December 2012 18:29:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:06 UTC