Page MenuHomePhabricator

librsvg uses class attribute order instead of document order during CSS cascade
Open, Stalled, Needs TriagePublic


As demonstrated by, librsvg seems to implement CSS cascading incorrectly.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="" width="300" height="300">
  <style type="text/css">
  <rect width="100%" height="100%" class="blue red"/>

The specs at specify that "The last declaration in document order wins." (blue in the example),
but librsvg apparently favors whichever class was mentioned last in a class attribute (red in the example).

Event Timeline

JoKalliauer changed the task status from Open to Stalled.Jun 30 2021, 2:57 PM
JoKalliauer moved this task from Backlog to update librsvg on the Wikimedia-SVG-rendering board.