W3C home > Mailing lists > Public > www-svg@w3.org > November 2010

Re: [whatwg] classList should perhaps move from HTMLElement to Element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Nov 2010 12:47:07 -0800
Message-ID: <AANLkTikUPnFcinKCVT13_NP8-S0=gXLjEeF+x6Aih+mb@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Jonas Sicking <jonas@sicking.cc>, whatwg <whatwg@lists.whatwg.org>, www-svg <www-svg@w3.org>
On Tue, Nov 23, 2010 at 12:25 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 23 Nov 2010 21:04:37 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> I agree that unless we get other groups in on this change, and get
>> things like SVG cross-references and CSS styling reacting to these id
>> and class-list changes, then we're just making things more confusing
>> by making the DOM pretend that the class changed, when no other
>> systems agree.
>
> Well yes, obviously .class notation, #id, etc. would all have to remain
> functioning. To me it makes sense to define ID/class-ness at the DOM level.
> CSS operates on that level too.

Right; CSS doesn't care what the underlying language is doing; it only
cares that, when mapping from the underlying language to the CSS
element-tree, there are things called "elements" arranged in a tree
structure, which have "ids", "classes", and "attributes".  It just so
happens that in HTML, the mapping is trivial.

Theoretically CSS isn't tied in any way to HTML or XML.  The WebSRT
mapping to CSS, for example, shows how a language that isn't
explicitly tree-based can still be mapped into a CSS element-tree and
then styled.

~TJ
Received on Tuesday, 23 November 2010 20:48:04 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:46 GMT