Gizra / elm-attribute-builder

Build `List (Html.Attribute Msg)` in a modular manner
MIT License
1 stars 0 forks source link

Feature: Integrate with rtfeldman/elm-css #1

Open amitaibu opened 7 years ago

amitaibu commented 7 years ago

If I understand correctly seems that http://package.elm-lang.org/packages/rtfeldman/elm-css/7.0.0/Css#bold is mostly about creating css files. But I wonder if we could use it for inline css as-well.

In that case our attribute builder could do (also) it in a type safe manner

rgrempel commented 7 years ago

Yes, it looks like you can generate inline CSS with elm-css, using Css.asPairs to get a List (String, String).

One could pass that to our Html.AttributeBuilder.addStyles, since that's what it expects.

I'm not sure we'd want to pull in elm-css as a dependency, but we could at least write up an example.