Page MenuHomePhabricator

librsvg uses class attribute order instead of document order during CSS cascade
Open, 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).