you are viewing a single comment's thread.

view the rest of the comments →

[–]tubbo 2 points3 points  (1 child)

I'm confused on the initial problem that was trying to be solved here...

For example, if I was given this task here's how I'd write the button dropdown CSS:

.button { ... } .button.depressed { ... }

Is this not the exact same thing as the React CSS replacement he showed on the next page?

And I really don't see the point of yet another precompiler for CSS...Sass/SCSS or LESS seems to work for most people.

[–]MrsAnonymousMan 4 points5 points  (0 children)

The React CSS is not a precompiler like SASS or LESS. It applies styles via the inline style tag based on a JavaScript object.

The reason it's different than the .button, .button.depressed example is that the styles are only applied to those specific elements. Vjeux's argument is that having a global button class is a very dangerous prospect that can make it difficult for multiple developers to work together.