W3C home > Mailing lists > Public > public-html-comments@w3.org > April 2010

Re: Alternate syntax for defining class attribute

From: T.J. Crowder <tj@crowdersoftware.com>
Date: Fri, 9 Apr 2010 23:21:40 +0100
Message-ID: <r2vc95470a1004091521y311252fdpa7670b8bc3512946@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: "Musgrove, Jason L" <J.L.Musgrove2@wlv.ac.uk>, public-html-comments@w3.org
Hi,

> Regarding the original suggestion, my response from last year still holds:
>
> > I think what would be helpful would be to make a JS library that fakes
> > this (by searching for elements with attributes that start with "." and
> > adding them to the class="" attribute), and seeing if it gets adoption.
> > That would provide interesting information for future developers of
> > HTML.

I think it's an interesting idea, and I might well do it [not least so I can
use this syntax (with an extra space before "."] in my own JavaScript-based
projects).

But I don't really know how much value it would have as input to future HTML
specifiers. There's an enormous difference between a JavaScript library for
doing this and a specification defining it:

* Using JavaScript (if we're talking client-side JavaScript) limits the
authoring audience to those not only willing to use JavaScript, but willing
to have the styling of their documents break if JavaScript is not present or
is disabled. (To me this is very, very different than authors waiting until
they know their target browsers support the feature.)

* The styling of documents will be wrong until the JavaScript has finished
processing the page (same assumption we're talking client-side JS).

* A library from J Random Software Guy would not have the advantage of tens
of thousands of bloggers saying "What's new in the HTML spec"

* A library from J Random Software Guy has to be sought out and integrated
by authors

Based on the above, we'd have to expect that even an infinitesimally small
adoption of the library would be a big endorsement of the concept, and I'm
not sure humans work that way. We see infinitesimal and
see...er...infinitesimal. :-) I actually worry such a thing might be
counter-productive...

...but I bet I still write it. :-)
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On 9 April 2010 22:50, Ian Hickson <ian@hixie.ch> wrote:

> On Fri, 9 Apr 2010, Musgrove, Jason L wrote:
> >
> > I'm assuming the "HTML" serialization is based upon SGML, like HTML 4
> > was.
>
> It is not. For more discussion on this, see:
>
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing
>
>
> Regarding the original suggestion, my response from last year still holds:
>
> > I think what would be helpful would be to make a JS library that fakes
> > this (by searching for elements with attributes that start with "." and
> > adding them to the class="" attribute), and seeing if it gets adoption.
> > That would provide interesting information for future developers of
> > HTML.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
Received on Friday, 9 April 2010 22:22:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:02 GMT