This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-01
Channels
- # beginners (41)
- # boot (25)
- # cider (34)
- # cljs-dev (221)
- # cljsrn (1)
- # clojure (191)
- # clojure-dusseldorf (4)
- # clojure-hamburg (1)
- # clojure-italy (8)
- # clojure-poland (1)
- # clojure-russia (22)
- # clojure-spec (27)
- # clojure-uk (91)
- # clojurescript (101)
- # core-async (11)
- # cursive (33)
- # data-science (9)
- # datascript (3)
- # datomic (30)
- # emacs (4)
- # events (4)
- # garden (6)
- # jobs (3)
- # leiningen (8)
- # luminus (39)
- # lumo (2)
- # off-topic (158)
- # om (13)
- # onyx (1)
- # parinfer (22)
- # planck (2)
- # protorepl (5)
- # re-frame (7)
- # reagent (10)
- # remote-jobs (1)
- # ring (1)
- # ring-swagger (20)
- # unrepl (92)
- # vim (11)
Can anyone explain why re-com forces you to do so much styling inline? If I want to justify, I have to do it in the component, instead of the CSS because justify-content is set inline on most components. flex-wrap is another example that must be set inline. Was this a conscience choice? Why not set these defaults in the re-com CSS so they can be overridden globally.
@lumpy my guess is that it’s because this is just the way (however awful) in react-land
I never understood some of the guys in react-land.... they write all their styles inline, but since many CSS features don't work inline they created a library (Radium) to provide a larger subset of CSS with some data DSL on JS objects then put all those style data in a separate JS file called styles.js
.
I was dropped into multiple projects like this at work and when I protested, nobody saw anything wrong with this crazy thing. You could imagine how frustrated I was when I had the pass the same "style object" everywhere to emulate CSS classes or wanting to use some CSS pseudo classes that wasn't supported by Radium.
CSS is too easy, let's use a subset of it to make it harder. /s
/rant
inline CSS is only a small subset of what you can do in stylesheet. you can't define classes inline.