Many places, I see the practice of "@media only ..." recommended in css. However, the w3c validator does not accept this. Lets take an example, from:

https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

@media only screen and (max-width: 500px) {
    .gridmenu {
        width:100%;
    }

    .gridmain {
        width:100%;
    }

    .gridright {
        width:100%;
    }
}

If I paste this into the CSS validator, it says "unrecognized media only", also when I specify CSS3. If, however, I omit the only keyword, the CSS is validated. Who's right here? w3schools or w3c? And does it matter whether the only keyword is included?

EDIT - This is the validator I used: http://www.css-validator.org/

Given the design, it didn't occur to me it might not be w3c's own, because it had the w3c logo and everything. I'm not sure why what appears to be the genuine validator, https://jigsaw.w3.org/css-validator/ comes up in Russian in my browser, however that was the reason I didn't use it. I thought it couldn't be the "official" one. It's fixed now.

    
    
Thank you. Those who downvoted, kindly explain your downvote. – Balthazar 4 hours ago

1 Answer 1

Use the following validator, you shouldn't run into any problems.

https://jigsaw.w3.org/css-validator/

    
Thank you. Sorry for newbie question, but why is it in russian? Or is it only on my system? – Balthazar 4 hours ago
    
@Balthazar fine for me :) switch language at the top. – Win 4 hours ago
    
Sorry, it's extremely late here. Given that it first came up in Russian, I didn't realize it was w3c's own validator. – Balthazar 4 hours ago
    
@Balthazar no problem! glad I could help. – Win 4 hours ago