sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
358 stars 73 forks source link

rendering inline styles #120

Closed emmanueltouzery closed 8 years ago

emmanueltouzery commented 8 years ago

I'm using clay to render inline styles, in the HTML, like so:

<div style="margin-top: 10px">

it works well, but I couldn't find a "good" api for that. renderWith compact [] is still generating the {} around the style, which I have to remove with tail . init. Is there is a better way which I've missed? If not, it would be nice to support this use case from the library.

phadej commented 8 years ago

I run into this issue myself, haven't found better approach tail .init myself either :(

bobjflong commented 8 years ago

Me too, note that {margin-top:10px} is not valid CSS. Proposed a new htmlInline configuration here.

phadej commented 8 years ago

This is awesome, thanks!