Closed Bug 153307 Opened 22 years ago Closed 22 years ago

Select boxes do not display styles from Options correctly.

Categories

(Core :: Layout: Form Controls, defect, P5)

x86
Windows XP
defect

Tracking

()

RESOLVED DUPLICATE of bug 79107
Future

People

(Reporter: mozilla, Assigned: rods)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1a) Gecko/20020611 BuildID: 20022061104 Even though the styles/classes of OPTION tags are rendered in the drop down list, they are not rendered in the Text of an un-expanded SELECT box (although the select box does appear to be sized as if it has taken the styles/classes of the elements into account, just not applied correctly to the text). Reproducible: Always Steps to Reproduce: Try the page at http://xo.dubplates.org/~xo/cssbug1.html. I have reproduced enough information to replicate the bug here: <style> .button { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; text-transform: none; color: #000088; text-decoration: none} </style> 1) <select class="button"> <option style="color: #880000">No</option> <option style="color: #000088">Maybe</option> <option style="color: #008800">Yes</option> </select> 2) <select> <option class="button" style="color: #880000">No</option> <option class="button" style="color: #000088">Maybe</option> <option class="button" style="color: #008800">Yes</option> </select> 3) <select> <option class="button" style="font-size: 9px">No</option> <option class="button" style="font-size: 18px">Maybe</option> <option class="button" style="font-size: 27px;">Yes</option> </select> Actual Results: Box 1 always has the color from the class button, even though the options are coloured differently; Box 2 is too small to hold the text inside it because the default text size is larger than 9px (also the default text is black). Box 3 is large enough to hold the largest element, but the text is still at the default size (and color). In all 3 cases, the drop down list *is* rendered correctly obeying classes and styles. Expected Results: For what i see in the drop down list to be reflected in the un-opened list box :)
->Form Controls
Assignee: attinasi → rods
Component: Layout → HTML Form Controls
QA Contact: petersen → tpreston
Summary: Select boxes do not display styles from Options correctly. → Select boxes do not display styles from Options correctly.
this also happens if you try to use "display: none" on the first element of a <select>. see: http://www.tufts.edu/~lbenne01/option_display.html
You shouldn't be styling selects or options, per the CSS spec it isn't specified yet. We shouldn't be allowing any styling of form controls...
Priority: -- → P5
Target Milestone: --- → Future
... but that doesnt change the fact that the current implementation is not self- consistent.
sure, I agree. We are working on the XBL form controls, and I don't want to spend too much time on the current set of form controls since they will be going away.
re: comment #3, can you provide a citation for where the spec says this? i just checked over the css1 & css2 specs & didn't see anything to this effect...
*** This bug has been marked as a duplicate of 79107 ***
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.