Re: Requirements for (level >=3) tests

2012/2/21 "Gérard Talbot" <css21testsuite@gtalbot.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.

I don't think this is necessary.  The test suite needs to (a)
correctly test things, and (b) be readable by people reviewing the
tests.  That's all.


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

One of your quotes is a simple assertion without evidence.  The rest
present correct reasons to avoid @style in many cases in real-world
code, but *none* of them are relevant to the test suite except in
certain obvious circumstances.


> It was also discussed to remove it from HTML5.

That was pushed by Hixie.  Hixie has some odd ideas about the ideal
HTML sometimes.

~TJ

Received on Wednesday, 22 February 2012 00:13:48 UTC