Re: Requirements for (level >=3) tests

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.


eg
"should be avoided since it mixes structure and presentation."
http://www.456bereastreet.com/lab/developing_with_web_standards/css/#css


eg
"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."
http://www.htmldog.com/guides/cssbeginner/applyingcss/


eg
"
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
http://www.htmlhelp.org/reference/html40/attrs.html#style


eg
"
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.
"
http://docstore.mik.ua/orelly/web2/xhtml/ch08_06.htm#INDEX-1736


eg
"
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.
"
http://webdesign.about.com/od/beginningcss/qt/tipcssinlinesty.htm
http://webdesign.about.com/od/css/a/aa073106.htm

It was also discussed to remove it from HTML5.

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

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Wednesday, 22 February 2012 00:00:49 UTC