@levitanong Unfortunately no, I just want to convert the internal garden representation of a color into it's respective css value representation
garden.compiler/render-value appears to be the entry point to converting the values back to their respective css counterparts
ex. (garden.compiler/render-value (garden.color/rgba 16 64 16 0.5)) would produce the equivalent css value --> "rgba(16, 64, 16, 0.5)"
the cljs counterpart that i'm using doesn't appear to check on whether the methods are private, so i'm happily using render-value on the clojurescript side of things
however, i'd love to be able to use it directly in my stylesheet when creating certain aspects of it, for DRY-sake, i'm forced to put in a lot of magic numbers where i'd rather not put them
on the clojurescript side i'm using render-value to work with rum, since the attribute :style
won't accept a string, so garden.core/style is out of the question, which leaves me to using garden.compiler/render-value
@benzap oh, fascinating. You mean to say that you are attempting to use garden to populate the :style
attr of a component? (to my knowledge, the behavior you described is a react thing, rather than a rum thing. So om, fulcro, reagent are all affected)
Yep, that's what I mean ๐
I'm guessing it's any react implementation that uses sablono under the hood
Thatโs an interesting use-case, and one that I had wished for on more than one occasion. But i had resigned myself into thinking that this is for making css style sheets, rather than naked styles. Maybe Joel will see this and consider the use case, or elucidate the lack of support.
well, I feel like it was an intended use-case to include within html, but it just doesn't play well with the sablono map-attr styling. Maybe if he introduced another method specifically for sablono :style
attributes? Essentially all it would need to do is leave out the step in fully generating a string, and just render the values in the map