Re: List selector and class attribute

On Thursday 01 March 2007 02:45, you wrote:
> On Wed, 23 Mar 2005, Allan Sandfeld Jensen wrote:
> > On Tuesday 22 March 2005 02:54, Ian Hickson wrote:
> > > On Mon, 21 Mar 2005, Allan Sandfeld Jensen wrote:
> > > > 	Or should HTML attributes be white-space transformed so only
> > > > spaces remain.
> > >
> > > This actually should already happen. Per SGML parsing rules, U+000A,
> > > U+000D, and U+0020 all either get stripped or turn into U+0020.
> >
> > Thanks, I finally found it. Looking up standards that are not fully open
> > and cost money sucks. Hopefully this detail can be added to the appendix
> > of HTML in next revision?
>
> Actually for compatibility with existing browsers, the above requirement
> has been dropped in the HTML5 parser specification. U+000D now turns into
> U+000A, but U+000A and U+0020 are preserved in quoted attributes.
>
>    http://www.whatwg.org/specs/web-apps/current-work/#attribute2
>
> From the WHATWG "replying to old e-mails everyone has forgotten about"
> department,

Yes I know. Of course the unspoken consequence of compatible attribute parsing 
is that CSS list selector can accept new-lines separated classes.

This way HTML5 needs the following update in CSS 2.1:

s/space/whitespace/ on

5.8.1
[att~=val] 
Match when the element's "att" attribute value is a space-separated list   
of "words", one of which is exactly "val". If this selector is used, the 
words in the value must not contain spaces (since they are separated by 
spaces).

5.8.3
Note: If an element has multiple class attributes, their values must be 
concatenated with spaces between the values before searching for the class. 
As of this time the working group is not aware of any manner in which this 
situation can be reached, however, so this behavior is explicitly 
non-normative in this specification.


`Allan

Received on Thursday, 1 March 2007 06:47:27 UTC