W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2021

Confusing error message

From: Imaginatorium Shop <shop@imaginatorium.org>
Date: Wed, 12 May 2021 02:48:03 +0900
To: www-validator-css@w3.org
Message-ID: <4745a3e9-e335-2d94-2bd1-7b1363cd0150@imaginatorium.org>
The following page illustrates an external stylesheet problem: the file 
is present, and is loaded, but a typical browser (Chromium) even shows 
the content of the stylesheet, while not applying it:

https://imaginatorium.com/test.html

The validator says: "File not found: https://imaginatorium.com/test.css: 
You can't import an HTML document ", while showing the content of the 
file. Obviously "File not found" is wrong - it should say something 
like: "Error: stylesheet is served with wrong Content-Type (text/html)". 
It also only finds this error for the @import version, and happily 
accepts the link tag, even though that file is also ignored by the browser.

(OK, the original error was mine: I was earlier using PHP to generate 
stylesheets, as the only way to stay sane, but not now, and I removed 
the http header code, but forgot to change .htaccess to stop it going 
through PHP.)

Best wishes,
Brian Chandler

Jigsaw puzzles from Japan
https://imaginatorium.org/shop
Received on Tuesday, 11 May 2021 19:54:11 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 11 May 2021 19:54:12 UTC