Lately, I've been working on a project using Raphael 2.0.1 and after running some cross-browser checks, I noticed that text is not displaying correctly in Safari. It seems like the 'dy' attribute is inheriting the value of the 'y' attribute.
Here is part of the HTML code related to this issue:
<text style="font: normal normal normal 12px/normal 'Helvetica Neue'; text-anchor: start; cursor: pointer; opacity: 0.7; " x="96" y="15" text-anchor="start" font="12px "Helvetica Neue"" stroke="none" fill="#17d6c6" opacity="0.7">
<tspan dy="15">U.S Population - Blood</tspan>
<tspan dy="10.799999999999999" x="96">Type Breakdown</tspan>
</text>
Below is my JavaScript code for the problematic text:
var type_text = lab_culture_type.text(96, 15, 'U.S Population - Blood\nType Breakdown');
type_text.attr({'fill':'#17D6C6', 'font':'12px "Helvetica Neue"', 'text-anchor':'start','cursor':'pointer'});
In Safari, only the 'y' and 'cy' values are being linked together. Since I'm dealing with a lot of text elements, assigning individual classes doesn't seem like a great solution (it feels messy). I've attempted to target the 'dy' attribute without success. For reference, I am utilizing Raphael along with jQuery.
I am using Firefox 9.0.1 and Safari 5.1.2 on OS X.
Any assistance on this matter would be greatly appreciated!