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

Re: About dropping the style attribute

From: Jens Meiert <jens.meiert@erde3.com>
Date: Wed, 27 Jun 2007 10:55:43 +0200
Cc: www-style@w3.org
Message-ID: <20070627085543.77820@gmx.net>
To: public-html@w3.org

gonchuki wrote:

> > That just doesn't suffice. How will you handle unique formatting,
> > when desired? How should we expect ad partners to cooperate, not to
> > speak of getting them aboard? How's scoped style sheets handling?
> > What signal is it leading everything through by scripting?
> I see no special limit on ad serving other than some paranoid
> advertisers that deliver their code with a style="border: 0", which in
> this case we can still manually remove the attribute and handle it via
> CSS.

This is not an option, and it completely misjudges the ad industry (and their pals).

> As for unique formatting, that's something we already do via #id,

Assuming that an exemplary content rich site probably allows images from 100 pixel minimum height/width to maximum 300 pixel height/width, you'd recommend to create 80,199 IDs? Or, probably discovering that there might be two images of the same size on a page, 201 classes for assigning the individual width, and additional 201 classes for the height (402 image measurement related classes)?

I'm pretty sure that /nobody/ here wants to do that, even when I'm exaggerating to illustrate that problem.

> and given the greater weight given to the rule it (sic) outweights
> whatever is set, giving the desired 'unique formatting'.

I probably misunderstand you, but "style" is more specific than any selector with no matter how many IDs [1] (assuming the same importance).

> IMHO, HTML5 should be the final step in educating authors and
> authoring tools alike to separate content from presentation, several
> tags and attibutes are being dropped in this spec, and dropping the
> style attribute is the last signal to say "presentation doesn't belong
> here".

Presumably, XHTML 2 will do a better job in that, and even the current draft still includes the "style" attribute [2].

Again, "style" has its qualification, and we're better off educating its responsible use.

Patrick Garies wrote:

> Use of the style attribute and presentational attributes are
> effectively the same thing. The reason that presentational attributes
> are frowned upon is because they are in the source, strewn about the
> document. This makes maintenance more difficult since the document is
> more difficult to read, edit, troubleshoot, etc.

Of course, nobody appears to claim the opposite.

> I don’t see how using the style attribute solves any of those things.

It does address certain "real-life" problems ...

Ian Hickson wrote:

> http://lists.w3.org/Archives/Public/public-html/2007Jun/0003.html

... but Ian's certainly right 0:)

[1] http://www.w3.org/TR/CSS21/cascade.html#specificity
[2] http://www.w3.org/TR/xhtml2/attributes.html

Jens Meiert
Received on Wednesday, 27 June 2007 08:56:00 UTC

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