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

RESOLVED DUPLICATE of bug 265894

Status

()

Core
SVG
RESOLVED DUPLICATE of bug 265894
7 years ago
7 years ago

People

(Reporter: Jeremie, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
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
(Reporter)

Comment 1

7 years ago
Created attachment 459817 [details]
testcase

Updated

7 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 265894
You need to log in before you can comment on or make changes to this bug.