rtfeldman / elm-css

Typed CSS in Elm.
https://package.elm-lang.org/packages/rtfeldman/elm-css/latest
BSD 3-Clause "New" or "Revised" License
1.23k stars 196 forks source link

fix: Runtime exception when using css in SVG elements #561

Closed Confidenceman02 closed 2 years ago

Confidenceman02 commented 2 years ago

fixes #543

Context

When unStyling nodes elm-css internally was using VirtualDom.property "className" ... which was causing runtime exceptions for svg elements. The property "className" is deprecated for svg elements and was the reason for the exception.

This meant that anytime you would set css inside of any svg element, an exception would be thrown and cause the page to not render correctly.

virtualdomerror

Fix

Using VirtualDom.attribute "className" ... properly sets the value and stops the exception from happening.

Extra

rtfeldman commented 2 years ago

Published as 17.0.3!

Confidenceman02 commented 2 years ago

:raised_hands: