Skip to content

How to create breakpoint for height? e.g @media (max-height: 922px) #12788

Closed Answered by wongjn
nicitaacom asked this question in Help
Discussion options

You must be logged in to vote

Yep! You could use an arbitrary variant, [@media(max-height:953px)]:top-[34%] or you could have it as a screen value in your Tailwind configuration:

screens: {
  foo: {
    raw: '(max-height: 953px)'
  }
}
<div class="foo:top-[34%]">

See both examples in this Tailwind Play (open the Generated CSS panel).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@nicitaacom
Comment options

@nicitaacom
Comment options

Answer selected by nicitaacom
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants