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: Set attribute value to class #562

Closed Confidenceman02 closed 2 years ago

Confidenceman02 commented 2 years ago

fixes #563

Context

Using attribute does set the css class correctly however the attribute name needs to be class instead of className.

Using className will set classes as classname in dom nodes and className in svg nodes which is incorrect.

Here we can see the incorrect attribute name. On the left we should be seeing a handsome elm-select. No styles are applied. classnames

And with correct class. classnamefixed

Confidenceman02 commented 2 years ago

Many apologies for this oversight.

rtfeldman commented 2 years ago

So just to confirm, class works with both SVG and HTML nodes?

rtfeldman commented 2 years ago

Published as 17.0.4