Really interesting discussion and viewpoints. As newcomer and hobbyist in the elm arena, some may think this naive, but I find the principle to separate concerns very appealing. Meaning (simply put) the DOM (html) is for the component structure, CSS is for layout, and JavaScript is for interaction. IMHO, the fuzziness we have to deal with is because each of the 3 building blocks is lacking features that we need. Which is why so many web apps/ sites end up with messy DOM trees with loads of unwanted div layers, and messy Jquery as a band-aid for styling deficiencies.
In learning elm (coming from react), I really like the functional and pure aspects of it. But I really wish I would be able to keep styling and transitions for state changes separate, preferably with styling in CSS stylesheets. Especially for transitions. I try to have my elm code render only twice, and let CSS would take care of transition. Seperates concerns, and keeps code clean. Is the right class applied in state 1? And in state 2? Then elm is fine. Layout and transition wrong? Must be CSS. Adding a subscription in elm to every single of 500 animation frames + extending model to not only save state but also all in-between-two-discrete-states information, feels like an unwanted complication and mixture of concerns. I see benefits of DOM + styling + interaction mix in components (reminds me of Polymer). And I dislike the cascading aspect (and other shortcomings) of pure CSS, and it is hard to switch back and forth between elm and CSS mindset. Not sure of I can keep transitions from blending, and the will definitely investigate elm CSS solutions mentioned. But for now, I still believe code will be cleaner and more maintainable as it grows, if one persists to separate the styling on the one hand from the content and interaction in the other. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.