W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] several messages about <cite>

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 15 Apr 2008 04:26:34 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0804150411430.3690@hixie.dreamhostps.com>
On Tue, 15 Apr 2008, Shannon wrote:
> 
> I've seen a few suggestions now that class be used as an identifying 
> attribute for purposes other than CSS. While this seems logical it 
> raises some issues for designers and implementers. Consider the 
> following:
> 
> <cite class="small book blue">The Neutronium Alchemist</cite>
> 
> In this example which of these classes is the type, and which serve only 
> as style?

All of them. "class" isn't intended for styling, it's intended to subclass 
elements. The subclassing can then be used for style, but using 
presentational classes (that is, classes that describe the desired 
presentation instead of the reason for that desire, the subclass of the 
element) misses the point.

For example, saying class="blue" with an associated .class { color: blue } 
will quickly become confusing if you decide those things should be red. It 
is in fact no better to use CSS that way than to use <font color=blue>.


> There is also the issue to consider that website "developers" and 
> website "designers" are usually a totally different species. Designers 
> often have little understanding of how classes may be used in an 
> application. The potential is high that the designer will use 
> class="book" on a totally unrelated element which is bound to cause 
> visual problems if the application/developer is using the class as a 
> program element.

All the people involved in the developement of a site and its style sheets 
should of course agree on a set of class names.


> My proposed solution is to use the rel attribute which basically serves 
> this purpose already. It also has less potential for conflicts than the 
> type attribute since I have only ever seen rel used in the header 
> whereas type has existing meaning for input fields and script tags.
> 
> <cite rel="book" class="small blue">The Neutronium Alchemist</cite>

I strongly disagree with the characterisations of the class attribute in 
this example.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 April 2008 21:26:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:01 UTC