DEV Community

Discussion on: If you could start over from scratch, how would CSS work?

Collapse
 
coolgoose profile image
Alexandru Bucur

Considering the 'recent' grid and flexbox I think we're in a decent spot regarding CSS. I still do hate specificity in some cases (and !important can burn) but we're in a really great spot now compared with IE6 when I started developing.

Starting from fresh I only have three things on my list:

  1. Some sort of 'namespacing' so you can do 'BEM' on the html classes without beeing 'mycomponents__looks--like-candy'
  2. Any kind of nesting like SASS or your favourite pre-processor.
  3. Better handling of z-index and overflow
Collapse
 
stevensonmt profile image
stevensonmt

While I enjoy flexbox and especially grid, but I recently started using Elm and find the approach taken by the style-elements package very insightful. Layout and positioning is not really "style" it's architecture. Separating layout and style into different tools makes a lot of sense to me.