The End of Global CSS(medium.com)

over 3 years ago from Catalin Cimpanu, DN Moderator

  • Mike PropstMike Propst, over 3 years ago

    Reminds me a bit of the presentation by a Facebook engineer on why they're using inline styles on all React components. The path he shows for how they got there is a mess of overengineering that could've been solved with a preprocessor and even a basic understanding of CSS architecture. The end result is a mess that's the exact opposite of DRY.

    That said, our team is doing something similar to this article (packaging the individual style assets with React components using Webpack and loading them as necessary) and it seems to be working thus far. My problem is the way people recently seem to be talking about core functionality of CSS — the ability to style things site/app-wide — as a "necessary evil." I see a fundamental misunderstanding of not just how it works, but how it's intended to work in a lot of these articles.

    I also didn't like the UNTIL NOW "here's your savior" tone but that's pretty standard for DN/Product Hunt/etc.

    0 points