Open krompaco opened 6 days ago
Another issue is the @layer
which is baseline but not recognized by the validator.
Also discussed here: https://github.com/w3c/css-validator/issues/410
I will add an example later to this comment
This comment describes the css-issues KTH has with the current css-test as of 2024-10-05:
Public address to the site where the errors occurs: https://www.kth.se/
Validator link for https://www.kth.se/: https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.kth.se%2F&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en
List of errors that occures: Unrecognized at-rule @layer revert-layer is not a all value : revert-layer Value Error : margin revert-layer is not a margin value : revert-layer etc.
Motivation: @layer och revert-layer are not recognized by the validator but they are valid according to MDN
Link to MDN Web CSS Reference that describes the errors: https://developer.mozilla.org/en-US/docs/Web/CSS/@layer https://developer.mozilla.org/en-US/docs/Web/CSS/revert-layer
List any existing issues for the errors: https://github.com/w3c/css-validator/issues/410 I have not found any matching issues for revert-layer
Running python default.py -u https://www.kth.se -t 7 -r --setting details=true
gives the following results when using the main branch of webperf core with commit 05cf8301c9e39549e500ff2ebc450fb31dfe3c8f:
###############################################
# Testing website https://www.kth.se
## Test: 7 - CSS
Started: 2024-11-08 22:22:24
Finished: 2024-11-08 22:22:49
### Rating:
- Overall: 4.44
- Standards: 4.44
### Review:
#### Overall:
- The CSS is good.
#### Standards:
- `<link rel="stylesheet">` in: #1: Webpage , number of grouped error type: 4 ( 4.20 rating )
- `<link rel="stylesheet">` in: #1: Webpage , number of errors: 30 ( 2.00 rating )
- CSS: Unrecognized at-rule “@layer” (number of errors of this type: 12)
- CSS: “margin”: “revert-layer” is not a “margin” value. (number of errors of this type: 3)
- CSS: Parse Error. (number of errors of this type: 2)
- CSS: “margin-bottom”: “revert-layer” is not a “margin-bottom” value. (number of errors of this type: 2)
- CSS: “line-height”: “revert-layer” is not a “line-height” value. (number of errors of this type: 2)
- CSS: “--bs-dropdown-box-shadow”: Parse Error. (number of errors of this type: 1)
- CSS: “all”: “revert-layer” is not a “all” value. (number of errors of this type: 1)
- CSS: “display”: “revert-layer” is not a “display” value. (number of errors of this type: 1)
- CSS: “margin-top”: “revert-layer” is not a “margin-top” value. (number of errors of this type: 1)
- CSS: “font-weight”: “revert-layer” is not a “font-weight” value. (number of errors of this type: 1)
- CSS: “font-size”: “revert-layer” is not a “font-size” value. (number of errors of this type: 1)
- CSS: “padding”: “revert-layer” is not a “padding” value. (number of errors of this type: 1)
- CSS: “grid-template-columns”: “revert-layer” is not a “grid-template-columns” value. (number of errors of this type: 1)
- CSS: “grid-gap”: “revert-layer” is not a “gap” value. (number of errors of this type: 1)
- `content-type=".*css.*"` in: #20: index.7aad2bf9., number of grouped error type: 2 ( 4.60 rating )
- `content-type=".*css.*"` in: #20: index.7aad2bf9., number of errors: 3 ( 4.70 rating )
- CSS: “rotate”: Property “rotate” doesn't exist. (number of errors of this type: 2)
- CSS: Unrecognized at-rule “@layer” (number of errors of this type: 1)
Note that the webpref core test also complain about the rotate
property but that error is not present when running the validator directly.
Feature/improvement
This is a valid way of setting an empty value
--tw-pan-x: ;
.https://www.w3.org/TR/css-variables-1/#syntax
Running CSS-test in Docker with this version info:
Results:
CSS-file that get these errors: https://liramera.se/dist/styles.css?v=gh-issue
This is also discussed here: https://github.com/tailwindlabs/tailwindcss/discussions/8150
And here: https://github.com/w3c/css-validator/issues/405 - Seems to have led to this fix: https://github.com/w3c/css-validator/commit/9a54c0d93534d3a6d3415fff297d67fd5fcf91d1 Not sure in which release this would go to?
Other newer directives and techniques that are also flagged
container-type: inline-size
- https://developer.mozilla.org/en-US/docs/Web/CSS/container-type