Re: Requirements for (level >=3) tests

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.


> Using <style> for styles that
> only affect one element in a small self-contained test case doesn't
> make sense to me.  It means you have to look back and forth to find
> what styles apply to what.

If the test is small, then I do not think you have to look back and forth.

Often, tests use abstract, meaningless, non-descriptive identifiers
(class names, id attributes) instead of meaningful, descriptive,
intuitive, helpful ones. That contributes to difficulties in following,
examining, understanding a test.

e.g.:
http://test.csswg.org/suites/css2.1/20110323/html4/margin-collapse-027.htm

> In fact, I saw one reftest (from Gecko
> source code) that confused me considerably, because it had two divs
> and the style wasn't inline, and the styles were in a different order
> in the <style> than the divs were in the document,

I agree with you that ideally CSS code order should follow the tree of
nodes in HTML; it contribute to avoid mixing up. I adopted such coding
practice but it isn't listed in the guidelines.

> so I initially
> thought the styles applied backwards.

We can not see the test you are referring to.

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

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 Monday, 20 February 2012 21:18:46 UTC