Layout
In this library, layout belongs in your view function. There, I said it. And actually you'll find that that's not too crazy of an idea.
In style-elements, you construct your view from Elements
which live in the Element
module. You can think of an Element
as an Html
node, but with layout being explicit.
Element
= Html
+ An explicit idea of layout
By having layout be explicit, it means that refactoring a layout with style elements is as easy as refactoring elm code(which you may know is a very lovely experience).
But let's not get ahead of ourselves, why don't we check out some code!