question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should CSS 2 be part of this test suite?

See original GitHub issue

The CSS Snapshot states that CSS 3 is defined by a core part, CSS 2, extended by several modules. These modules define new properties, selectors etc. or replace some existing terms in CSS 2.

However several definitions that were already in CSS 2 are untested in this test suite.

This includes:

  • features that are currently only defined in CSS 2, such as the visibility and z-index properties
  • features that are redefined in modules that are “not ready for implementation”, such as border-collapse, border-spacing, caption-side, empty-cells, table-layout properties of CSS Table Module Level 3
  • features that are now deprecated, such asclip in CSS Masking Module Level 1
  • several selectors (+, >, * etc.)
  • several properties whose syntax was not extended such as border, margin, padding and font longhands
  • a lot of values or units (for width, float, position properties etc.)

Sometimes, the tests do exist, but are just put in other modules (for example, the direction property).

Basically, adding / moving tests would make this “syntactic” test suite more exhaustive and would show more clearly what’s actually new in modules, especially the first levels. However, i guess a lot of these features, if not all of them, are supported by every major browser for a long time now, and adding tests would increase score of all the browsers. But it’s hard to say if there are discrepancies without… testing.

It is worth it? I can try to prepare a PR if it’s a goal of this project.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
LeaVeroucommented, Jan 9, 2022

And for the web platform tests the CSS WG is also striving for completeness, right?

css3test is not WPT, they have very distinct purposes. WPT needs to be extensive yes, but WPT also tests full conformance, so even CSS 2 features could be failing in some ways. css3test only tests recognition, and its aim is to give developers a quick view of which modern features a browser supports at a glance. Adding a bunch of tests that every browser passes and has done so for over a decade just adds noise and does not help anyone achieve anything. It’s the same reason we avoid adding tests that no browser passes (yet).

Correct info about overall support

Define “correct”. Should html5test.com also test <p> and <a> to show “correct info about overall support”?

Correct placement of tests (some tests that should be for CSS 2 are tested for newer specs)

Some examples would be useful.

Easier for test authors when features get extended

Could you elaborate?

0reactions
SebastianZcommented, Jan 10, 2022

Correct placement of tests (some tests that should be for CSS 2 are tested for newer specs)

Some examples would be useful.

All of Color Level 3, several cursor values, background-position, counter-increment, and more.

Why should Color L3 be under CSS2?!

My fault. Just some of the values are already defined in CSS 2.

From what I read above, all three recent contributors agree to add it. And I almost have a patch ready for review. So when’s the point you’ll concede? 😉

No concession is needed, if you want to add these tests, I’m not going to stop you! 😊 I don’t think these tests do much harm (except a slight perf hit), I just think it’s a colossal waste of time to add them. But it’s your time, so I don’t get a say with how you spend it. 😶

Ok, time is wasted, patch is ready. 😉

Sebastian

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Test Suite Documentation - W3C
During a CSS working group teleconference it was suggested that the tests in the test suite should be separated into test pages and...
Read more >
CSS2 Test Suite: Prototypical Pages - meyerweb.com
CSS2 Test Suite : Prototypical Pages ; 6.4.2, - !important rules ; 6.4.3, -, Calculating specificity ; 6.4.4, -, Precedence of non-CSS hints...
Read more >
Is there a CSS syntax test suite? - Stack Overflow
I doubt there is a css selector test suite that works only on the CSS. Since CSS is developed to be a companion...
Read more >
CSS2.1 and the Case for Collaborative Testing - fantasai 46
Well, the simple answer is that building a test suite at W3C allows the completion of CSS2.1's candidacy stage. Microsoft by itself could...
Read more >
Extra CSS testsuite requirements · Issue #10053 - GitHub
@mrego you can use relative paths in the css tests or .css, .js, or images, they just can't go up ('../') and need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found