I'm having a problem where Firefox doesn't seem to apply the font-size property (set in CSS) to SVG text elements.
The following example is enough to reproduce the problem in Firefox:
<svg width="40em" height="25em" viewBox="0 0 40 25"> <style type="text/css"><![CDATA[ text { font-size: 1px; } text.foo { font-size: 2px; } ]]></style> <text x="0" y="10" class="foo">Hello, world! foo</text> <text x="0" y="20">Hello, world! bar</text> </svg>
Here is the expected result (Chromium): 
Here's what Firefox does: 
I cannot find what I am doing wrong. Any ideas? Thanks.
source share