Closed Bug 245450 Opened 22 years ago Closed 22 years ago

no styles given to an option contained in a select with a specified attribute of a particular value

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 245449

People

(Reporter: mkpdev, Assigned: dbaron)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514 I'm not sure that this is a bug so much as an inconsistency (see fix). Option inherits style when specifying that it's contained in a select with a specific size. For example: option { color: blue } select[size=1] option { color: green } All options in a select of size 1 will be blue (or rather the text in them will be). However: input { background: none } input[type=submit] { background: purple } All submit buttons will have a purple background. This also let me see a different *real* bug which is that the UA ignores all elements after the first if it's not able to apply the style (not sure if that was clear). For example: * { color: green } select[size=1] option, optgroup { color: black } All optgroups will be green (again: what I mean is green text :-) ). Reproducible: Always Steps to Reproduce: 1. Create an HTML document with a form and style associated with all SELECT elements. 2. Add a style for OPTIONs contained within each select of a specific size. 3. Make sure that the attribute's value is not in quotes. Actual Results: The specified options will inherit, if possible, or go to the default style for that element. Expected Results: It should have given the applicable elements specified styles. Fix: select[size="1"] option { ... } instead of select[size=1] option { ... }
Oops. Double-submitted :-( Duplicate of 245449. *** This bug has been marked as a duplicate of 245449 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.