Closed
Bug 842869
Opened 12 years ago
Closed 12 years ago
`text-decoration: underline` does not correctly apply to descendant inline elements of a `float: [left|right]` link
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 727125
People
(Reporter: bugzilla, Unassigned)
References
Details
(Keywords: regression)
Attachments
(1 file)
283 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17
Steps to reproduce:
Have markup as follows:
```
<a href="#"><span>Text</span></a>
```
CSS:
```
a {
float: left;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a span {
vertical-align: middle;
}
```
Version: 18.0.2 Platform: Linux Mint 12
Reproduced on Mac OS X Lion, version 19.0
Actual results:
On placing the mouse cursor over the link, the text underline appears at the top of the anchor element. On mouse down, the underline moves to the correct position for the remainder of its existence.
jsFiddle: http://jsfiddle.net/Lum8n/
Test case of the above fiddle also attached.
Expected results:
The underline should always appear in the correct location (below the contained `span` element's text contents). Additionally, when the underline does appear, it appears to be touching the text's baseline (as opposed to the normal offset between text and underline).
Attachment #715796 -
Attachment mime type: text/plain → text/html
![]() |
||
Comment 1•12 years ago
|
||
Confirmed with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130224 Firefox/22.0 ID:20130224031053 CSet: 195e706140d1 though I see no Difference in Mouse Hover and Mouse Down State (the Underline remains on the Top).
This seems to have regressed within Firefox 4 and 8 Timeframe.
Updated•12 years ago
|
Component: Untriaged → Style System (CSS)
Product: Firefox → Core
Comment 2•12 years ago
|
||
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130225 Firefox/22.0
The underline isn't displayed at all until mouse hover, when it appears at the top of the span. When leaving the span, the underline disappears completely from the page.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regression range is
Last good nightly: 2011-08-04
First bad nightly: 2011-08-05
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=be4b064f1159&tochange=5684f06138f3
Probably caused by Bug 403524.
![]() |
||
Comment 5•12 years ago
|
||
Last Good: 144add433e72
First Bad: 225a79ce27bc
Triggered by:
225a79ce27bc Vitor Menezes — Fix text-decoration positioning in quirks mode and set overflow areas to match. (Bug 403524) r=dbaron Change the quirks mode text-decoration code (soon to be used for all modes) to follow CSS 2.1's rules for positioning of decoration lines. Decorations are now drawn at a constant vertical position established by the element creating the decoration, and more than one of the same type (underline, overline, line-through) of decoration are supported on the same piece of text. This means that text-decorations can now significantly overflow a text frame, since the vertical-alignment of the element with text-decoration may be substantially different from the vertical alignment of the text. Set overflow areas for text frames with text decorations in nsLineLayout::RelativePositionFrames since it must happen *after* vertical alignment is done, and when relative positioning data are consistent (nsIFrame::GetRelativeOffset matches the offset that has been applied).
Blocks: 403524
Keywords: regressionwindow-wanted,
testcase
![]() |
||
Updated•12 years ago
|
Component: Style System (CSS) → Layout: Block and Inline
![]() |
||
Updated•12 years ago
|
Flags: needinfo?(dbaron)
The correct rendering here probably involves an underline that is slightly mispositioned due to the offset associated with 'vertical-align: middle'. But the fact that it ends up as an overline is a duplicate (and related to having vertical-align: something-other-than-baseline on the child of a *block* with text-decoration.)
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(dbaron)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•