elm-css
elm-css copied to clipboard
Empty style node emitted if no styles
Because of a weird situation with an unusual legacy UI framework in our Elm code, I noticed that elm-css will emit an empty style node if there are no classes. Generally that's not an issue, but inside a large table where each cell contains some rendered Html.Styled, it noticeably affects the performance of the page.
This is a problem with our code more than elm-css, but it's worth potentially improving the library as well. What do you think of not emitting the style node if the list of styles for a given node is empty? (For instance here and equivalent methods.)
Happy to put up a PR if this seems reasonable.
Happy to accept a PR for this! 👍