Re:Play with TailwindCSS in the Browser
by stefanfisk on Friday June 10, 2022 @09:15AM
(#31693660)
how would you use media queries or pseudo selectors in inline CSS?
[ Parent
| on HN ]
Re:Play with TailwindCSS in the Browser
by megaman821 on Friday June 10, 2022 @09:43AM
(#31694078)
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.
Re:Play with TailwindCSS in the Browser
by pcthrowaway on Friday June 10, 2022 @01:03PM
(#31696762)
Pseudo elements as well