W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2012

Re: Requirements for (level >=3) tests

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Tue, 21 Feb 2012 19:00:11 -0500
Message-ID: <ed91c58ff6679a9039d1cc0654b11376.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Public CSS testsuite mailing list" <public-css-testsuite@w3.org>

Le Mar 21 février 2012 15:23, Tab Atkins Jr. a écrit :
> 2012/2/20 "Gérard Talbot" <css21testsuite@gtalbot.org>:
>> Le Lun 20 février 2012 12:31, Aryeh Gregor a écrit :
>>> On Fri, Feb 17, 2012 at 3:12 PM, "Gérard Talbot"
>>> <css21testsuite@gtalbot.org> wrote:
>>>> "Inline styles should not be used unless the case is specifically
>>>> testing this scenario."
>>>> http://wiki.csswg.org/test/css2.1/format#style-element-embedded-styles
>>> What's the reason for this requirement?
>> Aryeh,
>> CSS was designed to reuse code, to reduce code and to help create a
>> clear separation of structure and presentation. With inline style, you
>> have none of these. By adopting such guideline, the test suite is
>> promoting best coding practices for CSS.
> The point of the test suite is to test implementations.  The tests
> must be easily readable, so they can be understood easily, but they
> are *not* supposed to be some guide for people to read to learn CSS.
> They are horribly suited for that.

The CSS2.1 test suite could have been created in a way that would test
implementations *and* consider everyone else related to/concerned about
CSS (web authors, book authors, tutorials, etc.) It's too late now to
wish for that.

If the CSS2.1 test suite is not using best coding practices when writing
tests, then it should invite contributors to do so. Loud and clear.
Intentionally. In the wiki about test format guidelines.

>>> So I actively prefer inline
>>> style.
>> One single unidentified test is still not a sufficient reason to
>> actively choose inline style. Even one thousand identified tests would
>> still not be a sufficient reason to.
> This is an unwarranted absolutism.  There is nothing inherently wrong
> with the style attribute or its use.

Tab, I disagree with you. For the 3 reasons I mentioned. If you do a bit
of research, you will see that inline style is clearly and formally
discouraged in advanced CSS-how-to, advanced CSS-tutorial websites.

"should be avoided since it mixes structure and presentation."

"best-practice approach is that the HTML should be a stand-alone,
presentation free document, and so in-line styles should be avoided
wherever possible."

In most cases, use of the CLASS or ID attributes is a better choice than
using STYLE since ID and CLASS can be selectively applied to different
media and since they provide a separation of content and presentation
that often simplifies maintenance.
HTML 4 Common Attributes, WDG

Inline styles cannot be reused, making style management difficult.
Moreover, such changes are spread throughout your documents, making
finding and altering inline styles error-prone.

Inline styles must be applied to every element you want them on. So if
you want all your paragraphs to have the font family 'Arial' you have to
add an inline style to each <p> tag in your document. This adds both
maintenance work for the designer and download time for the reader.

It was also discussed to remove it from HTML5.

There ought to be one standard on how we create tests.

Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Wednesday, 22 February 2012 00:00:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:24 UTC