Mahdi
Mahdi

Reputation: 9417

Is that possible to ignore the inherited font-size?

I have an OpenLayers map (SVG renderer), that contains dozens of bubbles/features and as I'm clustering them, I also apply a custom fontSize style to them -- via OpenLayers.Style.

On the other hand I have a reset rule like * { font-size: 14px; }. The circle,text and tspan elements -- the bubbles on the map, they all inherit the font size property from * and then that out-weight the inline attribute of font-size that OpenLayers apply on the text element.

If I temporary remove that inherited font-size from any of above elements via Chrome Developer Tools for example, then everything gets fine.

Any ideas how should I overcome this problem? Note that:

The actual text node looks like this -- barebones:

<text font-size="19.2px">
    <tspan>19</tspan>
</text>

Upvotes: 0

Views: 1300

Answers (1)

xpy
xpy

Reputation: 5621

What if you try body{ font-size:14px;} or at least a parent at a high level instead of *?

Upvotes: 1

Related Questions