KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to build style info within hiccup in order to place an element at a location indicated by the variables "top" and "left". My code looks like so: (html [:div {:style (str "top" top ";left" left)} "some text"]) This code is pretty ugly. It would be nicer if hiccup automatically rendered the "style" attribute using standard CSS style rules... Then I could write the following: (html [:div {:style {:top top :left left}} "some text"]) Is there already a library that does this? Or, do I need to roll my own solution? Thank you Clojurians for any pointers!
Tags (comma-separated)
Save Edits
Cancel