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: Mon, 20 Feb 2012 16:18:15 -0500
Message-ID: <7f36835db4f5ac13455a83e2b84fd184.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Aryeh Gregor" <ayg@aryeh.name>
Cc: "CSS-testsuite" <public-css-testsuite@w3.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?


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.


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

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

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