[CBX][FIX-html.css]<select size="1"> css rendering problem

VERIFIED WORKSFORME

Status

()

Core
Layout: Form Controls
P3
normal
VERIFIED WORKSFORME
18 years ago
17 years ago

People

(Reporter: James Lariviere, Assigned: rods (gone))

Tracking

({css1})

Trunk
Future
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3-])

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
DESCRIPTION:

The ,select size="1". background-color of the "drop down arrow" renders 
incorrectly when the general select is declared with input, such as:

input, select {
	background-color: #fff;
	color: #006;
	}

then next declare

select[size="1"] {
	background-color: #000;
	color: #0f0;
	}

if you omit the input (shown in test case 2) the <select>s render okay.


STEPS TO REPRODUCE:

view test case 1 for "INCORRECT" rendering.
view test case 2 for "CORRECT" rendering.

ACTUAL RESULTS:

The <select size="1"> renders with a background-color white when the background-
color for <select size="1"> is declared black.

view test case 1

EXPECTED RESULTS:

THe <select size="1"> should render with the typical "gray" drop down arrow. 

view test case 2

DOES NOT WORK CORRECTLY ON:

Win98 build 200062020 (6-20-00-m17 nightly build)
(Reporter)

Comment 1

18 years ago
Created attachment 10480 [details]
test case 1 - wrong rendering
(Reporter)

Comment 2

18 years ago
Created attachment 10481 [details]
test case 2 - "correct" rendering
(Assignee)

Comment 3

18 years ago
The problem is the button inside the select picks up the new "input" rule 
specified in the doc's "style" tag.

Hmmmm, this will take some thinking.


This bug has been marked "future" because the original netscape engineer working 
on this is over-burdened. If you feel this is an error, that you or another 
known resource will be working on this bug,or if it blocks your work in some way 
-- please attach your concern to the bug for reconsideration. 
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
(Reporter)

Comment 4

18 years ago
Hey Rod,

I think I may have a fix or at least lead you in the right direction.


	select > input[type="button"] {
	background-color: inherit;
	}

What's cool is that let's say you do a :focus for your select the button turns 
the same background-color as the select (in my case it's green).

I think I like this behavior better than what we come to expect (color gray) 
for this button all the time.

I'll post a test case.
(Assignee)

Comment 5

18 years ago
I tried this last week and it didn't work, but you gave me an idea. If I add 
!important to the rule then it works:

select > input[type="button"] {
  background-color: inherit !important;
}

Nominating for nsbeta3
Keywords: nsbeta3
Summary: <select size="1"> css rendering problem → [FIX-html.css]<select size="1"> css rendering problem
Whiteboard: Fix in hand
Target Milestone: Future → M17
Marking nsbeta3+
Keywords: correctness, css1
Whiteboard: Fix in hand → [nsbeta3+]Fix in hand
(Assignee)

Comment 7

18 years ago
actually this doesn't work. It picks up the background color of select which is 
white. I am going to set the button color to "buttonface", then leave this open 
and down grade it from nsbeta3 
(Assignee)

Comment 8

18 years ago
Changed the background-color for the arrow button to "buttonface", this is the 
best we are going to get for nsbeta3. The way the style context hierarchy set up 
for the selects and the containing button it wants to inherit the bg color of 
the select which is white.

setting this bug to nsbeta3-, and marking as future
Whiteboard: [nsbeta3+]Fix in hand → [nsbeta3-]
Target Milestone: M17 → Future
(Reporter)

Comment 9

18 years ago
Why does this kill the ability to color the button at all?  For example if I try:

select > input[type="button"] {
	background-color: #ff0;
	}

mozilla still renders the background-color as ButtonFace instead of yellow.

Comment 10

18 years ago
Updating QA contact.
QA Contact: ckritzer → bsharma
(Assignee)

Updated

17 years ago
Summary: [FIX-html.css]<select size="1"> css rendering problem → [CBX][FIX-html.css]<select size="1"> css rendering problem
(Assignee)

Comment 11

17 years ago
It now seems to work as weel as it is going to. makring works for me
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME

Comment 12

17 years ago
verified on build 2001-08-14-trunk
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.