Forum Moderators: not2easy

Message Too Old, No Replies

The W3C CSS Validation Service

         

larry29936

2:14 pm on Jul 24, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



I thought that W3C was supposed to be THE standard for everything related to internet standards. I used their CSS validator this morning and found the following problems with their CSS Validation Service:

It gave errors for em, rem, vh, and vw values
It gave errors for flexbox values

My understanding is that the source code is several years old, thus explaining the error. I've searched for a better validator and tried a few, but it seems that they're all based on W3C's validator. Does anyone know of a better CSS validator?

Thanks in advance

not2easy

3:19 pm on Jul 24, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The errors you are seeing are more likely to be due to a technical error with your .css document. The examples you cite are relative values that are invalid without previously establishing what they relate to. For example, if you are using em and/or rem as a value without first establishing a standardized font-size property then you are using them improperly.

I have not come close to reading all of the documentation they offer to fully explain all elements, but the validator is constantly updated to reflect all current standards. Their documentation is maddeningly detailed.

It is super if you can produce a .css document without errors or warnings but it is fairly normal to have a list of errors and warnings while the .css seems to work as expected. Browsers are far more forgiving than the w3 jigsaw tool. It is intended to help you learn the details and work toward perfection, but nothing happens if you don't. Its purpose is to show you what needs attention.

There is a nu validator that you can try and it may offer a better explanation of any errors or warnings - it is set up to validate .html, .css and/or .svg files. Select the level of report you want to see: [validator.w3.org...]

You can read more about any of the terms or elements you are having errors with, though be prepared to open a dozen tabs for any given element as it refers to so many documents that go into increasingly convoluted detail. This page lists "Terms" and you can read more about rem and em usage from here: https://www.w3.org/TR/css3-roadmap/#terms

The current status of all w3's work is found here: https://www.w3.org/TR/css3-roadmap/

[edited by: not2easy at 3:33 pm (utc) on Jul 24, 2020]

larry29936

3:28 pm on Jul 24, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



@not2easy - Thanks for taking the time to explain .

larry29936

3:37 pm on Jul 24, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



re-ran using NU validator and it came back with no errors.

not2easy

3:45 pm on Jul 24, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



That NU validator is an experimental project BTW - it works the same way as the other one, but it has a few added features and it gets updated with changes that are not yet "official". We have links to various other tools and resources listed in the CSS Forum Charter [webmasterworld.com]

(Charters are found under the "Forum Options" button on the menu just above the first post in any of our forums)

ronin

1:57 pm on Oct 7, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I thought that W3C was supposed to be THE standard for everything related to internet standards.


I know your question (and this forum) specifically relates to CSS, but note that:

"On 28 May 2019, the W3C announced that WHATWG would be the sole publisher of the HTML and DOM standards. The W3C and WHATWG had been publishing competing standards since 2012."


Source: https://en.wikipedia.org/wiki/WHATWG