mbylstra/html-to-elm

Style attributes not formatted properly

Closed this issue · 3 comments

Inline styles aren't currently formatted properly.

Input:

<div style="background-color: red;"></div>

Current output

div [ style "background-color: red;" ]
    []

Expected output

div [ style [("background-color", "red") ]
    []

Thanks!

Ah, that's something hadn't considered, which would need some parsing to do properly. For now, I'm using

div [ attribute "style" "background-color: red;" ]
    []

which should at least compile

I've opened #6 to address an alternative where the style function is used.

Sounds good, thanks!