DEV Community

Discussion on: How it feels like to style things in 2020?

Collapse
 
jwp profile image
John Peters • Edited

I love this article @madarsbiss . It exactly tells the story of confusion regarding CSS. CSS is a simple concept but the layout implementation in the browser forces us to learn how browsers use it. When we start combining and cascading things, we are easily able to spend a day or two trying to figure out something simple like I don't want that space, I don't want it there, I want row layout instead of column layout. This is why 3rd party solutions are everywhere. Everybody has an opinion.

As you mentioned, might as well carve out a week just to do simple refactoring and it's all done manually. There are some interesting ways to convert this psuedo language into a real one for sure. The more I use CSS the more I want it to act just like JavaScript or even better Typescript.

So until that day comes, (and I'm working on the ideas of that solution every day) I have thrown out all frameworks and use HTML Grid for all layout. With Angular's view encapsulation, I style for each view only. The global CSS is for global only styles. This at least cuts the debug problem down to the minimum. The Grid solves almost all layout issues.

Collapse
 
madza profile image
Madza

Gone through myself, so I just wanted to express the feeling xdd