Can i use viewport units or percentage in a media query?

For example:

@media screen and (min-height: 50vh){

It doesn’t make sense to do so: you are saying “do something when size of the viewport is a percentage of the size of the viewport”. If the viewport is one size, it cannot also simultaneously be a percentage of that size.

1 Like

makes sense. thank you!

on a side note, i asked this question because the text element on my code was set up to be responsive relative to the width BUT not relative to the height (i realized when i resized my browser to “half” of the height of my browser)

my follow-up question:
should i just play a guessing game then on how many pixels would be “half” of the viewport height?

should i even be worried about making code responsive relative to height in general?