Closed Bug 134871 Opened 23 years ago Closed 23 years ago

Mozilla ignores style sheets as local files

Categories

(Core :: CSS Parsing and Computation, defect)

PowerPC
Mac System 9.x
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 120789

People

(Reporter: mpt, Assigned: dbaron)

Details

Build: 2002033008, Mac OS 9.2 To reproduce: 1. In BBEdit (or BBEdit Lite) create a new document, consisting of this line: p {background-color: white; color: red;} 2. Save the document on your Desktop as `Style'. 3. Create another document, containing these lines: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>test</title> <link rel="stylesheet" href="Style"/> </head> <body><p>This paragraph should be red.</p></body> </html> 4. Save that document on your desktop as `Test XHTML file'. 5. Open `Test XHTML file' in Mozilla. What you should see: * `This paragraph should be red', in red. What you actually see: * `This paragraph should be red', in your default color (e.g. black).
Are you sure this isn't a parser problem with the trailing / in the link tag? IIRC they removed something to handle that since it was breaking some legacy HTML case.
Most likely a duplicate of bug 120789.... Two things to check: 1) Does renaming the stylesheet to "Style.css" make things work? 2) What are the type/creator for "Style"?
What I meant was "mpt, could you please check the following two things, since I don't have a Mac handy?"
Tested on OS X: * The suggested name without a filename extension doesn't work. * If the filename extension is .html, using this helps: <link rel="stylesheet" type="text/css" href="Style.css"/> Both the type attribute and the .css extension are required. * The elements need to be in the XHTML namespace in order to get the example working with the .xml and .xhtml extensions. * In the quirks mode, Mozilla doesn't require the type attribute on the <link>. Looks like expected behavior.
(1) Yes, adding `.css' works, but doing that will break every other page which uses that style sheet once I upload it to the server again. (2) TEXT and R*ch, just like any BBEdit Lite document by default. (I hope I'm not supposed to use ResEdit on all the style sheets I write.) As for what Henri said, this isn't Mac OS X; it's Mac OS 9, which doesn't suffer from filename extensions. This does appear to be a dup of bug 120789, but I don't understand that bug nearly as well as Boris appears to, so he can make the call. Suffice to say that it makes Web development extremely difficult.
*** This bug has been marked as a duplicate of 120789 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified. I know adding .css sucks. But if type/creator doesn't say anything about CSS then the extension is all the mime service has to go on in determining the file type. In which case the bug is that we ask for the file type at all in this case, and that's covered by bug 120789.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.