Closed Bug 647553 Opened 13 years ago Closed 13 years ago

text-decoration (underline, overline and line-through) CSS property is not inherited by floated elements

Categories

(Core :: Layout, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: adamalton, Unassigned)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0

Elements which are floated do not inherit the text-decoration property if it's underline, overline or line-through.  (They do inherit it if it's set to 'blink' though.)

If a floated element has the text-decoration property directly applied to it (rather than inherited from a parent element) then it works fine.

Strangely, Firebug does show the property as being applied, but it is not rendered that way.

Will attach a test.

Reproducible: Always

Steps to Reproduce:
1. Create an element with text-decoration:underline; applied to it.
2. Create another element within the first one which is floated right or left.

Actual Results:  
The floated element does not inherit the text-decoration property from its parent.

Expected Results:  
The child element should inherit the text-decoration property regardless of whether or not it's floated.
Confirmed on Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110402 Firefox/4.2a1pre ID:20110402030439

Works on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 ID:20110319135224
Version: unspecified → Trunk
Component: General → Layout
Keywords: regression, testcase
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → layout
http://www.w3.org/TR/CSS21/text.html#lining-striking-props says:

When specified on or propagated to an inline element, it affects all the boxes generated by that element, and is further propagated to any in-flow block-level boxes that split the inline (see section 9.2.1.1). For block containers that establish an inline formatting context, the decorations are propagated to an anonymous inline element that wraps all the in-flow inline-level children of the block container. For all other elements it is propagated to any in-flow children. Note that text decorations are not propagated to floating and absolutely positioned descendants, nor to the contents of atomic inline-level descendants such as inline blocks and inline tables.


That means that our behavior is correct.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: