SVG tspan with display:none should not affect text position




4 years ago
4 years ago


(Reporter: amelia.bellamy.royds, Unassigned)


Firefox Tracking Flags

(Not tracked)




4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150305021524

Steps to reproduce:

An SVG <text> element includes <tspan> elements with positioning attributes (x/y/dx/dy).  These tspans should only display under certain CSS media queries (to affect the layout in a responsive web site).

Test page:

Actual results:

The change in text position created by the attributes on the <tspan> is applied regardless of whether the tspan itself is displayed.

(You can replace the zero-width space characters in the test case with visible characters to confirm that the tspan *contents* are correctly displayed/hidden according to the media queries.  But the position attributes apply either way.)

Expected results:

The elements with display:none should have no effect on rendering.  This works in Chrome and IE.
By design I think, do take this up with Cameron.
You need to log in before you can comment on or make changes to this bug.