Closed
Bug 223122
Opened 21 years ago
Closed 21 years ago
Mozilla accepts CSS statements with errors in the selector
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 145968
People
(Reporter: robert.brindell, Assigned: dbaron)
References
Details
(Keywords: testcase)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 When a class is defined as: .small,.small:input, .small:textarea, .small:select { font-family: verdana; font-size: 8pt; } Code such as <td class="small"> will not render properly. if the class is broken out as such: .small { font-family: verdana; font-size: 8pt; } .small:input { font-family: verdana; font-size: 8pt; } Then they will all be rendered properly. Reproducible: Always Steps to Reproduce: 1. Create a web page that links an external CSS class definition. 2. Create an external CSS class definition using the definitions shown in 'details' section. 3. Use the definitions mentioned in the 'details' section (<td class="small">test</td>) on the page and view them in the Firebird browser. Actual Results: The defined class "small" will not render. Expected Results: Render the style as defined above. My computer has only common configurations that would not affect this discussion.
Comment 1•21 years ago
|
||
".small,.small:input, .small:textarea, .small:select" This syntax isn't even valid. It's not a surprise it's not doing what you want. Try .small, input.small, textarea.small, select.small Or for that matter, if small is styled the same for each of those tags, all you need is .small Anyway.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•21 years ago
|
||
*** Bug 223124 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 3•21 years ago
|
||
http://www.w3.org/TR/css-style-attr The above document references the ":" syntax as valid representation of a pseudo-class.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 4•21 years ago
|
||
You can't use HTML tags as pseudoclasses. Reference http://www.w3.org/TR/CSS21/selector.html#pseudo-elements
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 5•21 years ago
|
||
Bill, My intent is not to be difficult but it seems you are not willing to test/accept this as a bug. I would like to hear from some other people before you change the status of this bug. I understand that the code referenced is not the best syntactical usage (I have unfortunately inherited it). It is however valid. The document referenced as http://www.w3.org/TR/CSS21/selector.html#pseudo-elements does not specifically disallow tag names as pseudo-classes. My biggest contention with Firebird regarding this is that the same code usage will render properly in Mozilla 1.5 and 1.4 (and of course IE5 and IE6). It seems to me that there should be some consistency between the two, especially since the child does not allow all the things that the parent will. Without an answer to why there is a difference between the two, I feel this is still a bug.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 6•21 years ago
|
||
OK, here we go. This syntax: .small,.small:input, .small:textarea, .small:select { } is not valid and should be ignored. Why? http://www.w3.org/TR/CSS21/selector.html#pseudo-elements does not say you can make up your own pseudo-elements and/or pseudo-classes, and in fact you cannot. The exact allowable psuedo-elements/pseudo-classes are defined in that section. For Firebird to not render anything that you are attempting to style with such a rule is correct. The specification requires that if any part of a selector is not valid, the entire rule/statement is to be ignored. Reference http://www.w3.org/TR/CSS21/syndata.html#q10 The bottom line is the syntax you are using is not valid. There is nothing in the specification to support your position. Now, if you can produce a URL or a testcase where your invalid syntax is (correctly) ignored by Firebird and (incorrectly) accepted by Mozilla, that would constitute a Mozilla bug. Moving this bug to Browser/Style System pending such an example.
Assignee: blake → dbaron
Component: General → Style System (CSS)
Product: Firebird → Browser
QA Contact: ian
Summary: CSS classes not being recognized when defined in a common manner. See details. → Mozilla accepts CSS statements with errors in the selector
Version: unspecified → Trunk
Comment 7•21 years ago
|
||
Comment 8•21 years ago
|
||
In the attached testcase, the CSS using your syntax is correctly ignored in Firebird 20031019 and Mozilla 20031021 PC/Win2000. The CSS validator confirms that your syntax is invalid. Please attach a URL or testcase where you can demonstrate this syntax working, or this bug will be re-resolved invalid.
Keywords: testcase
Assignee | ||
Comment 9•21 years ago
|
||
I'm not that patient. I don't see anything in this bug that suggests there's a valid bug here, so marking invalid. If you disagree, please reopen. Note specifically: http://www.w3.org/TR/CSS21/selector.html#pseudo-elements (sections 5.10-5.12) http://www.w3.org/TR/CSS21/syndata.html#q10 ("When a user agent can't parse...")
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 11•21 years ago
|
||
Well I can not give you guys access to a url to show you because of the nature of the system. I am able to reproduce this every time. I aggree it is invalid syntax and is most likely a bug in Mozilla. All browsers except Firebird will render the example properly. It is no longer that important to me to have my for hundred thousand users migrate to Firebird. Thanks for your time guys.
Comment 12•21 years ago
|
||
This is not a bug in Mozilla. If your CSS is invalid, the CSS spec says the browser MUST ignore it. If other browsers don't, then they are buggy. Opera is buggy in this respect. I will be getting Opera fixed so that it will also ignore invalid CSS like this.
Reporter | ||
Comment 13•21 years ago
|
||
My comment is that Mozilla DOES render it so it IS a bug in Mozilla. As you put it - "buggy". No big deal though.
Comment 14•21 years ago
|
||
It does? Ah. Can you attach a testcase? What version of Mozilla are you using? This is correctly ignored for me using the following test cases: http://www.hixie.ch/tests/adhoc/css/selectors/parsing/001.xml http://bugzilla.mozilla.org/attachment.cgi?id=133784&action=view
Reporter | ||
Comment 15•21 years ago
|
||
Reporter | ||
Comment 16•21 years ago
|
||
Reporter | ||
Comment 17•21 years ago
|
||
Ok. Here is the code example. You guys are right. My test was being conducted comparing firebird and mozilla 1.4 When I correctly started testing using Mozilla 1.5 the code is ignored. 1.4 alowed the sloppy code but 1.5 does not and that is consistant with Firebird. Thanks again for all of your professional comments.
Assignee | ||
Comment 18•21 years ago
|
||
Ah, so really...
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Assignee | ||
Comment 19•21 years ago
|
||
...this is a duplicate of a bug that was fixed a few months ago. It's helpful to give the version number of what you're testing. From comment 0 I was under the impression that you were seeing the bug in a 1.5-based Firebird. *** This bug has been marked as a duplicate of 145968 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 21•21 years ago
|
||
That is correct. I thought it was 1.5 from the start but was misinformed.
You need to log in
before you can comment on or make changes to this bug.
Description
•