How to create breakpoint for height? e.g @media (max-height: 922px) #12788
-
I know that I can create `min-[1800px]:top-[34%] I want if <953px height top-[34%] Is it possible with tailwind? |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Jan 20, 2024
Replies: 2 comments 2 replies
-
Yep! You could use an arbitrary variant, screens: {
foo: {
raw: '(max-height: 953px)'
}
} <div class="foo:top-[34%]"> See both examples in this Tailwind Play (open the Generated CSS panel). |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nicitaacom
-
Also I can create something like this [@media_((min-height:940px)_and_(min-width:1800px))]:top-[34%] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep! You could use an arbitrary variant,
[@media(max-height:953px)]:top-[34%]
or you could have it as ascreen
value in your Tailwind configuration:See both examples in this Tailwind Play (open the Generated CSS panel).