rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2020-05-14T05:11:58.083100Z

Any rum compatible locally scoped CSS lib? Like if I want to define CSS style which applies to my whole rum component only?

2020-05-14T06:38:46.083600Z

@didibus Inline styles with something like https://github.com/noprompt/garden ?

2020-05-14T06:39:43.084300Z

Not specific to Rum, it works with any hiccup like library

2020-05-14T06:47:21.084600Z

I mean scoped to the component

2020-05-14T06:47:45.085100Z

Like something that let me declare styles which only apply to the component inside ClojureScript.

2020-05-14T06:48:04.085500Z

What’s the difference between that and inline styles?

2020-05-14T06:50:03.087400Z

Hum, I'm not sure πŸ˜› Kind of new to CSS

2020-05-14T06:50:09.087600Z

ah ok

2020-05-14T06:50:50.088500Z

if it has to be soped to component only, i would start with inline styles

2020-05-14T06:50:54.088600Z

Do you have an example of inline style with garden and rum?

2020-05-14T06:51:29.089100Z

[:div {:style (garden/css :color "bluel")} "hello"]

2020-05-14T06:51:34.089300Z

from the top of my head πŸ™‚

2020-05-14T06:52:41.089700Z

might be {:color "blue"}

2020-05-14T06:53:18.090100Z

you can also do it without garden, with plain text

2020-05-14T06:53:24.090400Z

Hum, that seems easy enough

2020-05-14T06:53:36.090800Z

[:div {:style "color: blue"} "hello"]

2020-05-14T06:54:03.091200Z

I might start with that, thanks

πŸ‘ 1
2020-05-14T08:47:15.091600Z

:style value should be a map, not a string

πŸ‘Œ 1
2020-05-14T08:47:36.092100Z

also note that with inline there's no way to declare :hover etc styles

2020-05-14T08:48:08.092500Z

Garden is fine, but might be super slow if you are building something interactive

2020-05-14T08:49:32.093500Z

aaand in inline styles map you can use keyword values {:color :blue} so that your IDE can help you with autocompletion later πŸ™‚