Closed
Bug 593544
Opened 16 years ago
Closed 16 years ago
:first-letter not applied to legend elements
Categories
(Core :: Layout: Form Controls, defect, P3)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
People
(Reporter: charette.s, Assigned: bzbarsky)
Details
Attachments
(2 files, 1 obsolete file)
|
576 bytes,
text/html
|
Details | |
|
3.28 KB,
patch
|
dbaron
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre
When specifying a legend:first-letter selector it is not matched. Same with the span element, but I found settings its css display to block fix the issue.
Reproducible: Always
Steps to Reproduce:
See attachment
Actual Results:
The selector is not applied
Expected Results:
The selector should be applied
| Reporter | ||
Comment 1•16 years ago
|
||
| Assignee | ||
Comment 2•16 years ago
|
||
:first-letter is only applied to block boxes. As you noted, <span> is an inline by default, so doesn't get a block box.
<legend> generates a replaced element box in Gecko, not a block box, so also doesn't have :first-letter apply to it.
We _could_ probably support :first-letter on <legend> if it's styled with display:block or display:inline-block, or just always. David, should we? Webkit and Presto seem to. They also don't allow changing the display of legend from "block", sidestepping the problem of what to do for other display types...
Status: UNCONFIRMED → NEW
Component: Layout: Text → Layout: Form Controls
Ever confirmed: true
QA Contact: layout.fonts-and-text → layout.form-controls
Summary: :first-letter not applied to legend elements and some non-block display elements → :first-letter not applied to legend elements
| Assignee | ||
Comment 3•16 years ago
|
||
Sounds fine to me.
| Reporter | ||
Comment 5•16 years ago
|
||
Just joining the block box spec for reference:
http://www.w3.org/TR/css3-selectors/#application-in-css
| Assignee | ||
Comment 6•16 years ago
|
||
Assignee: nobody → bzbarsky
Attachment #472110 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #472115 -
Flags: review?(dbaron)
| Assignee | ||
Updated•16 years ago
|
OS: Linux → All
Priority: -- → P2
Hardware: x86_64 → All
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [need review]
Comment on attachment 472115 [details] [diff] [review]
Like so
r=dbaron
Attachment #472115 -
Flags: review?(dbaron) → review+
| Assignee | ||
Updated•16 years ago
|
Priority: P2 → P3
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [need review] → [need approval]
| Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 472115 [details] [diff] [review]
Like so
Requesting approval for 2.0. This is a reasonably safe patch that aligns us with Webkit and Opera on the behavior of :first-line for <legend>. Nothing else other than <legend> is affected.
Attachment #472115 -
Flags: approval2.0?
Attachment #472115 -
Flags: approval2.0? → approval2.0+
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [need approval] → [need landing]
| Assignee | ||
Comment 9•16 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/922fac0b4b41, then backed out the forms.css part in http://hg.mozilla.org/mozilla-central/rev/f48f8389793d because Opera/Webkit do NOT force display:none to block.
David, should I try to emulate their quirks or just not worry about this?
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0b6
What quirks? Is the issue that you're allowing :first-letter on something that's not display:block? Or that they report legends as display:block even when specified otherwise? Or what?
| Assignee | ||
Comment 11•16 years ago
|
||
Presto and Webkit both ignore all specified values for "display" on legend except for "none". So "display: none" ends up as "none"; anything else ends up as "block". At least as far as I can tell.
I have no problem with allowing first-letter on <legend> no matter what its display is. I'm just not sure whether we should emulate the presto/webkit display behavior.
| Reporter | ||
Comment 12•16 years ago
|
||
Isn't that part of an other issue?
(In reply to comment #11)
> Presto and Webkit both ignore all specified values for "display" on legend
> except for "none". So "display: none" ends up as "none"; anything else ends up
> as "block". At least as far as I can tell.
Is that based on examining computed style or something else?
| Assignee | ||
Comment 14•16 years ago
|
||
> Isn't that part of an other issue?
Not quite, since it impacts when first-letter should apply to <legend>.
> Is that based on examining computed style or something else?
Examining computed style.
You need to log in
before you can comment on or make changes to this bug.
Description
•