The first definition from Cascading Style Sheets is omitted in browser

RESOLVED INVALID

Status

SeaMonkey
General
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: karlo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910

When Mozilla reads style definitions from a CSS file the first style is omitted.
As an example look at:

http://priede.bf.lu.lv/parbaudei/stili.html

and

http://priede.bf.lu.lv/parbaudei/stili2.html


Reproducible: Always
Steps to Reproduce:
1. Make a css file
2. Link the css file to a page
3. 

Actual Results:  
In the browser as well as in the composer the first definition is omitted.

Expected Results:  
All definitions of stiles should be taken in account.

Comment 1

13 years ago
<STYLE TYPE="text/css">

<!--

You don't put HTML markup inside a CSS file.  Invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

13 years ago
(In reply to comment #1)

It is  not invalid (Look at "HTML 4.01 Specification
W3C Recommendation 24 December 1999",
http://www.w3.org/TR/1999/REC-html401-19991224/present/styles.html#h-14.5)

On the other hand -  a style sheet without HTML markup inside gives the same error
Example: 
http://priede.bf.lu.lv/parbaudei/stili3.html
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
> It is  not invalid 

Actually, it is.  The <style> is needed to tell an HTML engine that what follows
is a CSS stylesheet.  If you have an external sheet, the <style> is just part of
the first selector, which makes the rule be ignored.

> http://priede.bf.lu.lv/parbaudei/stili3.html

This has the exact same error.

Still invalid.  Please do read the CSS specification for how CSS should be
parsed, not the HTML specification, and note that IE has a number of known bugs
in its CSS parsing, this being one of them.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.