Monoid instance for CSS
m-bock opened this issue · 1 comments
m-bock commented
could there be a monoid instance for CSS?
To me it looks like an empty style is something possible and it would be useful if you pass styles to a function and they should be optional. Because then you'd not have to wrap it in a Maybe.
But - maybe - there are good reasons for not having this.
Benjmhart commented
monoid, and Eq instances would both be very handy.
use case: I have an array of CSS in a state monad, I want to union over them with some new styles, then fold them down into a single rule to be used by a style tag.