Closed Bug 342688 Opened 19 years ago Closed 19 years ago

font-size is ignored when contained in a style attribute in svg

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: uckelman, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060614 Fedora/1.5.0.4-1.2.fc5 Firefox/1.5.0.4 pango-text Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060614 Fedora/1.5.0.4-1.2.fc5 Firefox/1.5.0.4 pango-text Specifying the font size as an atribute in SVG works: <text x="5" y="50" font-size="50">He's dead, Jim!</text> whereas specifying the font size as a style attribute seems to have no effect at all: <text x="5" y="50" style="font-size: 50">He's dead, Jim!</text> Oddly, other font attributes (e.g. font-family) do work when given in a style attribute. Reproducible: Always Steps to Reproduce: 1. View the SVG. 2. Compare text sizes.
If you check the javascript console you'll see "Warning: Error in parsing value for property 'font-size'. Declaration dropped.". In CSS a font size must be specified with units, i.e. font-size: 50px;
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
(In reply to comment #3) > If you check the javascript console you'll see "Warning: Error in parsing value > for property 'font-size'. Declaration dropped.". In CSS a font size must be > specified with units, i.e. font-size: 50px; > I was not aware that SVG errors appeared in the javascript console. Thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: