Clojurians
#css
<
2017-02-05
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

pesterhazy16:02:17

enjoyed reading about css-in-cljs: https://github.com/roman01la/cljss

pesterhazy16:02:02

it's basically react-native's inline styles for the web :slightly_smiling_face:

pesterhazy16:02:40

thanks for this @roman01la

pesterhazy16:02:18

I was wondering why this is implemented as a macro rather than just a function that accepts a map

niamu17:02:00

I believe it’s a macro to do the production stylesheet output at compile time. A normal function would need to be explicitly called.

roman01la23:02:14

@niamu @pesterhazy that's right. it's very basic you can not have dynamic styles with it. If you want dynamic styles I'd recommend to take a look at this https://github.com/thheller/shadow/wiki/shadow.markup

pesterhazy23:02:01

Dynamic in the sense that you can use a let binding, as in tbheller's example?

roman01la23:02:51

@pesterhazy: when styles can be computed at runtime. In cljss for example styles can not be changed after you define them