Closed
Bug 414851
Opened 15 years ago
Closed 15 years ago
CSS whitespace: nowrap not respected when inherited from a cell by a button
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
People
(Reporter: jsp, Assigned: jruderman)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
2.43 KB,
text/html
|
Details | |
2.44 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
According to the CSS 2.1 specification, the value of the whitespace property is inherited. This has broken in one case in Firefox 3 beta 2: when a button is contained in a cell. If the cell specifies nowrap, any text in the button should not wrap, but it does. This appears to be specific to the button-in-a-cell case, since whitespace: nowrap is respected in the following scenarios: - nowrap is specified on the button directly - rather than a button, a div is the contained element - rather than a cell, a span is the containing element - rather than a cell, a floated div is the containing element
Assignee | ||
Comment 1•15 years ago
|
||
According to DOM Inspector, the button's computed white-space value is "normal" because resource://gre/res/forms.css contains button { /* Buttons should lay out like "normal" html, mostly */ white-space: normal; text-indent: 0; } This is a "user agent stylesheet", and the CSS spec talks about user agent stylesheets, so I don't think this is a spec violation. But it looks like the intent of that line is to override a rule earlier in the same stylesheet, so I think it is unintentional, and easy to fix. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/style/forms.css&rev=3.146&mark=473,483#458 Dunno why Firebug was telling you something different.
Blocks: 55285
![]() |
||
Comment 2•15 years ago
|
||
The <span> test doesn't apply here, since there is no constraint on the available width there. Yeah, we migh want to rearrange the rules in forms.css to take this out... Jesse, want to write up a patch?
Component: Layout → Layout: Form Controls
OS: Windows XP → All
QA Contact: layout → layout.form-controls
Hardware: PC → All
Assignee | ||
Comment 3•15 years ago
|
||
Sure. Should I split "white-space: pre;" out of the large rule, or should I change the small rule to specify "inherit" instead of "normal"?
![]() |
||
Comment 4•15 years ago
|
||
Specifying "inherit" seems simpler.
Updated•15 years ago
|
Keywords: regression
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → jruderman
Assignee | ||
Comment 5•15 years ago
|
||
Think this patch should go in for 1.9 or after 1.9?
Attachment #302495 -
Flags: superreview?(bzbarsky)
Attachment #302495 -
Flags: review?(bzbarsky)
![]() |
||
Comment 6•15 years ago
|
||
Comment on attachment 302495 [details] [diff] [review] patch I think it's reasonable to take this for 1.9...
Attachment #302495 -
Flags: superreview?(bzbarsky)
Attachment #302495 -
Flags: superreview+
Attachment #302495 -
Flags: review?(bzbarsky)
Attachment #302495 -
Flags: review+
Assignee | ||
Updated•15 years ago
|
Attachment #302495 -
Flags: approval1.9?
Updated•15 years ago
|
Attachment #302495 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 7•15 years ago
|
||
Fix (including reftest) checked in.
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•