Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow batching of attributes #54
When composing styles one might have functions that define borders or fonts or backgrounds etc.
This can get awkward when using them:
el (List.append thinBorder headerFont [ width fill, padding 8]) <| text "Header"
This pull requests introduces the
batchAttributes : List (Attribute msg) -> Attribute msg
Then, the thinBorder function can return a single
el [thinBorder, headerFont, width fill, padding 8] <| text "Header"
With thinBorder looking like:
thinBorder : Attribute msg thinBorder = Element.batchAttributes [ Border.width 1 , Border.solid , Border.color <| greyscale 0.65 , Border.rounded 3 ]
I wanted to ask about your opinion and the status about this PR.
Are you considering merging it? Or do you not like it?
Thanks in advance.