4 ms·
how would you use media queries or pseudo selectors in inline CSS?
by stefanfisk 4y ago
how would you use media queries or pseudo selectors in inline CSS?
- megaman821 4y agoI 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.
- f3b5 4y agoGood 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.
- deleted 4y ago[deleted]
- pcthrowaway 4y agoPseudo elements as well