easafe / purescript-flame

Fast & simple framework for building web applications
https://flame.asafe.dev
MIT License
292 stars 10 forks source link

Grouping elements in SVG #56

Closed asvanberg closed 2 years ago

asvanberg commented 2 years ago

Trying to render the example from https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g using;

svg
  [ viewBox "0 0 100 100"
  , createAttribute "xmlns" "http://www.w3.org/2000/svg"
  ]
  [ g
    [ fill "white", stroke "green", strokeWidth "5" ]
    [ circle' [ cx "40", cy "40", r "25" ]
    , circle' [ cx "60", cy "60", r "25" ]
    ]
  ]

Fails and gives back a blank SVG. The problem appears to be the nesting of the circles inside the g tag, without the grouping the circles render fine.