LeaVerou / css3test

How does your browser score for its CSS3 support?
http://css3test.com
MIT License
214 stars 83 forks source link

Support complete @rules #194

Closed SebastianZ closed 4 years ago

SebastianZ commented 4 years ago

This makes it so that at-rules are checked including their descriptors, fixing issue #185.

In order to do proper checks, I've added complete rule declarations for all at-rules and adjusted the CSS so that multiple lines can be shown as values.

LeaVerou commented 4 years ago

Hey, thank you!

What if we check if braces are present and append {} if not? This way we don't need to tack {} at the end of existing examples that work fine with empty rules. What do you think?

Also, I see some CSS changes too, are they intentional?

SebastianZ commented 4 years ago

Appending the curly braces when they are not present would work for the existing rules, though that also has some downsides.

  1. It doesn't support existing or future at-rules that do not have a body like @import or @charset.
  2. It introduces some inconsistency between the rules, because some rules will include a body and others not, even when all of them require some descriptors in order to work.
  3. Always having complete rules allows for testing different descriptors.

I did the CSS changes in order to display the at-rules in a formatted way. Sorry that it wasn't clear from the commit message!

Sebastian

LeaVerou commented 4 years ago

Agreed with your reasoning. Merged, thanks!