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

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.
Example:

    <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:

http://esw.w3.org/topic/HTML/ProposalChainedClassnames

Thanks,
Charles

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