I learned recently that CSS supports nested selectors, but browser support still isn’t 100%.
I found that esbuild can un-nest the selectors, so I added this to my deployment script so that my CSS works for more people. (I chose the “chrome90” target extremely arbitrarily)
find . -name ‘*.css’ -exec esbuild {} --target=chrome90 --outfile={} ;
I like that it’s still optional so that I don’t have to run it in development, and if esbuild stops existing, my site will still mostly work!
From Julia Evans: TIL via this RSS feed
You must log in or # to comment.

