Last modified: 2011-10-15 17:39:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26000, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24000 - Update rsvg so styling SVG images with CSS works properly on Commons
Update rsvg so styling SVG images with CSS works properly on Commons
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
PC Linux
: High normal with 2 votes (vote)
: ---
Assigned To: Mark Bergsma
: ops
: 30033 (view as bug list)
Depends on: 29915
Blocks: svg
  Show dependency treegraph
Reported: 2010-06-16 12:45 UTC by Tomasz W. Kozlowski
Modified: 2011-10-15 17:39 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Screenshot of eog 2.30 (rsvg 2.26.3) on Ubuntu Lucid Lynx rendering the file correctly (55.31 KB, image/png)
2010-06-16 12:54 UTC, Tomasz W. Kozlowski

Description Tomasz W. Kozlowski 2010-06-16 12:45:00 UTC

Comment 1 Chad H. 2010-06-16 12:51:51 UTC
Think you might have submitted a bit too soon there. Can you try again? :)
Comment 2 Tomasz W. Kozlowski 2010-06-16 12:53:33 UTC
Yes, I've mistakenly pressed the 'Enter' button :)
Here it goes:

there seems to be a problem with styling CSS files and rendering them by the
rsvg library used by MediaWiki at Commons.

I have a fileła,_Biała_Krakowska.svg that
is styled with CSS using an internal stylesheet. 
I have read the CSS specification and used the code given there; the file is
valid according to the w3 validator. 

It renders correctly in Mozilla Firefox and Opera (click on the file to see) as
well as using rsvg 2.26.3 on Ubuntu Lucid Lynx (screenshot attached). However,
as you may see, the thumbnail visible at Commons renders incorrectly -- a path
that should be filled in orange is still blue.

Any ideas what may be wrong with that?
Comment 3 Tomasz W. Kozlowski 2010-06-16 12:54:47 UTC
Created attachment 7476 [details]
Screenshot of eog 2.30 (rsvg 2.26.3) on Ubuntu Lucid Lynx rendering the file correctly

Screenshot of eog 2.30 (rsvg 2.26.3) on Ubuntu Lucid Lynx rendering the file correctly.
Comment 4 Daniel Kinzler 2010-06-16 13:12:47 UTC
for what it's worth, rsvg 2.22.3 does *not* render it correctly for me. so hoefully, this can be fixed by ugrading rsvg.
Comment 5 Marcin Cieślak 2010-06-16 16:21:47 UTC
Seems like both cascading order ( and specificity ( rules are broken.

You have an author-specified rule:

#Biala_Krakowska { fill: #ff7e00 !important; }

in the local stylesheet that does not take precendence over author-specified normal rule in style="" attribute. 

I have uploaded a different version ( where style="" atributes are replaced with classes and where path#id CSS rule should take preference over path.class. However, it does not happen in the older versions of librsvg2 (I'm using 2.22.3 that exhibits similar problem to Wikimedia's). shows serveral improvements in the recent librsvg2, so looks like proper CSS support is being actively worked on.
Comment 6 Bryan Tong Minh 2010-06-18 13:58:37 UTC
Changing component to Wikimedia; this can be fixed by an rsvg update.
Comment 7 Tim Landscheidt 2010-07-14 14:51:19 UTC
I don't want to find the one of the many SVG bugs that is related to, but the broken PNG rendering of (the text "Meerenge von Chios" between the two islands) is fixed on my local box with "rsvg version 2.26.0", so please update and then close all bugs that have disappeared as well :-).
Comment 8 Ilmari Karonen 2010-10-31 21:48:30 UTC
The latest version of librsvg is 2.32.0.  2.22.2 is almost 1.5 years old.  It seems like it would be high time for an upgrade.
Comment 9 Derk-Jan Hartman 2010-11-04 04:38:38 UTC
Agree, updating rsvg seems like a VERY good idea.
Comment 10 Mark A. Hershberger 2011-04-28 22:19:40 UTC
Bumping priority, giving to Mark to handle and adding CT Woo to aid me in pestering them, or at least getting an update on the rsvg update.
Comment 11 Sam Reed (reedy) 2011-07-06 20:10:18 UTC
Removing "shell" keyword for things that aren't directly doable by shell users etc
Comment 12 Sam Reed (reedy) 2011-07-06 20:31:25 UTC
Adding ops keyword
Comment 13 Sam Reed (reedy) 2011-07-06 20:31:57 UTC
Removing shell keyword if exists
Comment 14 Sam Reed (reedy) 2011-07-06 21:39:29 UTC
Looking at this, upgrading to 10.04 will fix the known version problems

Just spoke to CT about this, and will look into whether we get the current image scalers upgraded, or how to proceed
Comment 15 Mark A. Hershberger 2011-07-16 21:15:54 UTC
Comment 16 Mark A. Hershberger 2011-07-25 23:04:24 UTC
*** Bug 30033 has been marked as a duplicate of this bug. ***
Comment 17 Mark A. Hershberger 2011-09-21 13:49:42 UTC
lowering priority on this that will take a little longer to get resolved.
Comment 18 Mark A. Hershberger 2011-09-24 17:12:22 UTC
*** Bug 31122 has been marked as a duplicate of this bug. ***
Comment 19 Brion Vibber 2011-10-15 17:39:01 UTC
Did an action=purge on,_Bia%C5%82a_Krakowska.svg and refreshed to check update status...

Confirmed that the old versions of the file now render correctly, with the orange-highlighted chunk in the middle -- previously they rendered all-blue and only the newer version that worked around the bug looked right.


Try ?action=purge on any images still affected by this and refresh to confirm they're good now.

Note You need to log in before you can comment on or make changes to this bug.