Matthew Griffith (mdgriffith) maintains an Elm package entitled elm-style-elements that moves all style declarations from CSS to Elm view functions. The main benefit is that your styles are type-checked by the Elm compiler -- no more jumping back and forth between the CSS and the DOM and the console to debug sites.
One of the write-ups that I have found instructive on using elm-style-elements to write responsive Elm applications is billperegoy's elm-page-layout.
The source code that accompanies the article is found on github.
I have adapted the approach using the experimental (next version) of elm-style-elements and posted a simple project to github called responsive-stylish-elephants.
The package API for stylish-elephants is online.
No comments:
Post a Comment