This test is validating all used CSS on the url specified. We are currently sending following sources to W3C CSS Validation for validation:
- Inline CSS in
style
-element - Inline CSS in
style
-attribute - CSS referenced using
link
-element
Addition to test all of above sources (compared to only test inline styles that W3C CSS Validation do) we are also adding support for:
- Draft CSS properties by using MDN Web Docs - CSS reference as guidance.
100%
as valid value offont-stretch
- Draft CSS functions by using MDN Web Docs - CSS reference as guidance.
For every source (see above) we are calculating rating based on:
- Number of different error types
- Number of total number of errors
we are then combining the results.
Math used are:
rating_number_of_error_types = 5.0 - (number_of_error_types / 5.0)
rating_number_of_errors = 5.0 - ((number_of_errors / 2.0) / 5.0)
As always, minimum rating are 1.0.
- Fork this repository
- As we are using external service ( https://validator.w3.org/nu/ and https://developer.mozilla.org/en-US/docs/Web/CSS/Reference ) your site needs to be publicly available and the machine running this test needs to be able to access external service.
Read more on the general page for github actions.
- Follow general local setup steps for this repository
- Next steps depends on what mode you want to runt test in
By settings w3c_use_website = True
in config.py
you tell the test
you want to use w3c service to test url.
This means that you can ONLY test public facing websites.
- Beside making sure to set above value to
True
you dont need to do anything more.
By settings w3c_use_website = False
in config.py
you tell the test
you want to use a version able to test privat websites like a test environment not open for public.
- Download and install Java (JDK 8 or above)
- Download latest vnu.jar and place it in your webperf-core directory
- Set
w3c_use_website = False
inconfig.py
No frequently asked questions yet :)