W3C home > Mailing lists > Public > public-html@w3.org > May 2007

Proposal: Chained Classnames (was: Extension Mechanism for HTML)

From: Charles Ying <charles.ying@gmail.com>
Date: Thu, 10 May 2007 09:08:44 -0700
Message-ID: <3db207a40705100908x21942218r82cc8ac5c041eaf1@mail.gmail.com>
To: "W3C HTML WG" <public-html@w3.org>

Hello HTML WG,

Although I am not sure I see strong value for predefined class names
yet, I would like to propose an alternate syntax in case it does need
to be specified:

Proposal: Use chained classnames on the class attribute in lieu of prefixes.

    <span class="html5 copyright">This span is copyrighted</span>

Both classes are required to activate whatever special property the
predefined class name has.

CSS2 can select this using:

    SPAN.html5.copyright { ... }

and existing content can still select using:

    SPAN.copyright { ... }

I apologize if this has been discussed before, I searched the archives
and didn't find anything.

Pros and Cons:
+ Seems clearer and more future proof than prefixed classnames.
+ No need to change stylesheets for existing content.
- Longer to specify (but simpler than role attribute)

I've placed this on ESW for reference:


Received on Thursday, 10 May 2007 16:08:47 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:20 UTC