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

Make Css.Structure.Property a custom type #572

Closed jfmengels closed 2 years ago

jfmengels commented 2 years ago

Ideally, this would be type Property = Property String - but in order to reduce allocations, we're doing it as a type alias until union types with one constructor get unboxed automatically.

Trying to realize your years-old wish. Feel free to ignore, I just couldn't help myself :sweat_smile:

jfmengels commented 2 years ago

Hmm, I didn't think it was a breaking change, because I (still) think this is only internal. I'm having a hard time telling in practice because elm diff doesn't work for me for this package.

But I guess if it's exposed, then it's probably best that people don't confuse it with Strings anyway :man_shrugging: