Any rum compatible locally scoped CSS lib? Like if I want to define CSS style which applies to my whole rum component only?
@didibus Inline styles with something like https://github.com/noprompt/garden ?
Not specific to Rum, it works with any hiccup like library
I mean scoped to the component
Like something that let me declare styles which only apply to the component inside ClojureScript.
Whatβs the difference between that and inline styles?
Hum, I'm not sure π Kind of new to CSS
ah ok
if it has to be soped to component only, i would start with inline styles
Do you have an example of inline style with garden and rum?
[:div {:style (garden/css :color "bluel")} "hello"]
from the top of my head π
might be {:color "blue"}
you can also do it without garden, with plain text
Hum, that seems easy enough
[:div {:style "color: blue"} "hello"]
I might start with that, thanks
:style
value should be a map, not a string
also note that with inline there's no way to declare :hover
etc styles
Garden is fine, but might be super slow if you are building something interactive
aaand in inline styles map you can use keyword values {:color :blue}
so that your IDE can help you with autocompletion later π