Media queries with Goober #378
joneslloyd
started this conversation in
Show and tell
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just wanted share a snippet for using media queries (with Goober, Tailwind and Twin) where the inbuilt Tailwind ones won't suffice (for example, setting a background image based on dynamic content which can't be handled as a background class in the Tailwind config file).
I just did this:
I could have put the
background-repeat
property as a Tailwind class on the section above (eg,lg:(bg-no-repeat)
), and also moved the position + sizes into custom Tailwind classes (leaving only the background image here).Beta Was this translation helpful? Give feedback.
All reactions