Closed Bug 588248 Opened 15 years ago Closed 15 years ago

External SVG marker references cannot be styled with external stylesheets CSS

Categories

(Core :: CSS Parsing and Computation, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mike.hemesath, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.33 Safari/534.3 Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b4pre) Gecko/20100817 Minefield/4.0b4pre #1 arrow.svg - Contains a path #2 marker.svg - Contains a triangle marker #3 style.css - Applies the triangle marker in marker.svg to the path in arrow.svg and styles it green. Example File: http://www.mikehemesath.com/svg_markers/demo2/arrow.svg Although the external stylesheet rule does successfully place the marker in marker.svg onto the path in arrow.svg, it doesn't apply the green fill style. This test case does work in Opera. The W3C specified how markers should be rendered here: http://www.w3.org/TR/SVG/painting.html#MarkerAlgorithm I'm not sure if firefox is wrong for not styling the marker or Opera is wrong for styling it. Reproducible: Always Steps to Reproduce: #1 arrow.svg - Contains a path #2 marker.svg - Contains a triangle marker #3 style.css - Applies the triangle marker in marker.svg to the path in arrow.svg and styles it green. Actual Results: The arrow is drawn with a black marker. Expected Results: The arrow is drawn with a green marker
FWIW, adding the style include to the top of the marker.svg file (as well as the existing inclusion at the top of the arrow.svg file) does make the style apply. I don't know whether this should be necessary.
This is the right behavior per the SVG specification. When referencing a paint server, you just get that paint server exactly as it looks in the document it lives in. That means it's styled however paint servers are normally styled in that document. Opera's behavior looks buggy to me. Robert, can we get this added to the SVG test suite?
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
jwatt is our inside man on the w3c. He should be able to add it.
You need to log in before you can comment on or make changes to this bug.