8 comments

[ 0.23 ms ] story [ 26.7 ms ] thread
Yeah i don't get this sentiment but i see it a lot here. Not a programmer but have coded websites since the early days. Css aint perfect but as long as youre not doing extremely complex layouts, its easy. You could learn enough css to get by in 2 hours. But for whatever reason, programmers don't bother to learn it, and that's how you get stuff like React.
I’m not sure that lack of css experience is what motivated the creation of react’s UI as a function of state paradigm is orthogonal to styling.
Gave my comment a second thought and you're right. React doesn't excuse you from learning css.
I know CSS very well and I really don't like it. I can't wait until components make all the ridiculousness of "cascading" go away. Explicit inheritance would be far less messy IMO.

I currently use Vue and I scope as much CSS as possible.

In case you're not seeing a problem with cascading, let me give you a scenario. It's not a scenario everyone will run into but in a sense it's the same problem in every CSS project. This is just a very concrete example.

When you create a UI that is supposed to be added to a web page (think browser extension) you have to manually override every single possible CSS attribute to make the styling consistent across web pages.

The shadow DOM is the first thing that helps this, but it's still not popular enough to use.

(comment deleted)
>Look how nicely centered that little red square is!

Is anyone able to see the red square to which the author refers? I'm not seeing it.

No red square for me. Using a recent Firefox on OSX.
Not directly related to the article, but IMO CSS is good for what we have now. There is no better alternative. As for Javascript - there are many great alternatives. (Scalajs, Purescript, Elm, Typescript,...)