Re: [css-hierarchies] HTML style attribute

@Tab: You didn't understand my point but you did say exactly the same thing 
as me :-) I never asked to create a new syntax for the style attribute, I 
just asked to reverse the changes that were made to its definition since 
HTML5 and which prevent it to contain all things a normal CSS rule could 

In HTML4, the style attribute was defined exactly as you did write using the 
new scoped stylesheet syntax: it worked as if you created a "special css 
rule" that apply only to the element who has the style defined on it (see 
[0]). That means that if you make changes to the CSS syntax to allow more 
things to fit in a CSS rule than regular property declarations, HTML4 
requires you to accept them in the style attribute too.

However, in HTML5, this is not true. The style attribute has been defined by 
some osbcure specification [1,2] that create a special syntax for the style 
attribute that's completely disconnected from the CSS syntax of a rule: it 
only accepts property declarations. My concern is that it will prevent the 
style attribute to benefit from any change applied to the definition of a 
CSS rule, including CSS Hierarchies.

I know the HTML5 specification is out of the scope of this working group, 
but the faulty specification is not the HTML5 one but CSS-STYLE-ATTR [2]. 
That one is under responsability of the CSS WG. I would like to have that 
specification updated to reflect the reality: the style attribute should 
behave like the body a CSS rule, not like a list of property declarations. I 
hope I was clearer this time.


-----Message d'origine----- 
From: Tab Atkins Jr.
Sent: Sunday, March 04, 2012 4:47 PM
To: Daniel Glazman
Subject: Re: [css-hierarchies] HTML style attribute

On Sun, Mar 4, 2012 at 1:06 AM, Daniel Glazman
<> wrote:
> Le 03/03/12 16:41, Tab Atkins Jr. a écrit :
>> On Sat, Mar 3, 2012 at 4:18 AM, François REMY<>
>>  wrote:
>>> Small questions for the spec editors of CSS Hierarchies: is it
>>> possible/needed to modify the syntax of the “style” attribute to
>>> accomodate
>>> hierarchies ?
>> It would be nice, but as Ms2ger said, it was already attempted once.
>> I won't attempt to push the change in this draft, but reviving the old
>> Style Attribute draft would be an interesting thing to do eventually.
> I don't think François's request make sense given the fact scoped
> stylesheets are on their way...

Good point.  "<el style='foo'>...</el>" can be thought of as a
shorthand for "<el><style scoped>:scope { foo }</style></el>", and the
latter already does everything we'd need this feature to do.

On Sun, Mar 4, 2012 at 5:25 AM, François REMY <> 
> Scoped stylesheets are nice, but maintaining the HTML4 behavior in which 
> the
> content of the "style" attribute was just inside a special rule targeting
> the current element seems valuable for the future, too.
> If we are going to modify what content can be found inside a css rule, I
> think we should modify the content that should be found in the style
> attribute accordingly, to keep mirroring, or we'll have two syntax to
> maintain instead of one.
> I don't understand the logic behind the HTML5 draft to create another
> (different) syntax for the CSS style attribute than for any regular css
> rule. Additionnaly, at this time, I think that they are indentical even if
> they use different tokens. This doesn't make sense to me, but it maybe 
> does
> for someone else.

I don't understand what you're saying at all.  I suspect that you
don't understand what <style scoped> does, but I can't tell.


Received on Sunday, 4 March 2012 16:15:30 UTC