Really enjoyed reading it. As I’m still looking to start learning elm-ui.
But I kinda hoped it would show me how elm-ui seperates layout and style and makes it easy to interchange. As that’s one of the things that got me interested in elm-ui, then again, maybe I remember wrong.
The previous version (style-elements) separated layout and style, but elm-ui no longer does. Matthew decided that keeping all that stuff together with the element is what provides the advantage. You can technically still split the visual styles out if you want but I’m not sure it’s necessary.
I don’t know if it’s the preferred approach, but I like to define custom types for styles and then match on the type to return the list of attributes. This makes it easy to refactor similar components by making the change in one place. You can then just append to the list for additional attributes in an element needs further customization/tweaking. Here’s an example I use for just text styling.
The first time I started working with Elm-UI, I found it’s output to be very similar to Bulma in a nice way except that it took less effort to get things right.
It’s actually refreshing for something in Elm to take less effort for me (Read, fewer iterations) to output something that looks the way you were imagining it to than alternatives such as JS.
We’ll see how well it handles more advanced HTML/CSS needs, but for the time being I feel about ready to forget what HTML and CSS even are lol.