Hacker News new | ask | show | jobs
by stefanfisk 1473 days ago
how would you use media queries or pseudo selectors in inline CSS?
3 comments

I was about to say, if anything it shows there is demand for the style tag to handle pseudo selectors. Setting up some CSS variables on the root and accessing them through the style tags would provide most of the benefit of Tailwind.
Good point, I don't know of any way of doing that inline. So that's definitely a good convenience function in Tailwind!

My lived approach to inline vs. not-inline is: why not both? Inline is great for prototyping, and for edge cases, like specific margins for wrapper divs. Where CSS classes really shine is when it comes to mature / often used components.

Pseudo elements as well