Closed Bug 581362 Opened 14 years ago Closed 14 years ago

CSS rules applied to elements within 'defs' or referenced through 'use' are misinterpreted

Categories

(Core :: SVG, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 265894

People

(Reporter: Jeremie, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b3pre) Gecko/20100723 Minefield/4.0b3pre
Build Identifier: Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b3pre) Gecko/20100723 Minefield/4.0b3pre

When you try to applied a CSS style to an element inside a 'defs' element and if you try to reused that element through the 'use' element, style are not apply to the resulting element.

On the other hand if you try to apply the CSS style, as if the resulting element were a clone of the original element, the style is applied to the element even if the resulting element does not appear in the DOM tree.

It seems to be exactly the opposite of what the spec says :

> For user agents that support Styling with CSS, the conceptual deep cloning of the referenced element into a non-exposed DOM tree also copies any property values resulting from the CSS cascade  ([CSS2], chapter 6) on the referenced element and its contents. CSS2 selectors can be applied to the original (i.e., referenced) elements because they are part of the formal document structure. CSS2 selectors cannot be applied to the (conceptually) cloned DOM tree because its contents are not part of the formal document structure.

(see http://www.w3.org/TR/SVG/struct.html#UseElement)


Reproducible: Always

Steps to Reproduce:
1. Open the testcase
 
Actual Results:  
You can see 2 red squares

Expected Results:  
You should see 2 green squares
Attached image testcase
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: