Fork me on GitHub
#re-frame
<
2017-08-01
>
lumpy11:08:42

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.

mattly18:08:59

@lumpy my guess is that it’s because this is just the way (however awful) in react-land

akiroz19:08:50

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

ajs16:08:59

I thought in-line CSS styles could do everything a style sheet can do, is that not true?

akiroz21:08:42

inline CSS is only a small subset of what you can do in stylesheet. you can't define classes inline.

jeaye23:08:14

The re-frame-test example uses Karma. I just tried using doo and a nodejs target, but I'm getting errors with some of my third party JS deps. SyntaxError: Unexpected token import

jeaye23:08:34

Is only Karma supported with re-frame-test? Or perhaps just not the nodejs target?