is there a way to perform this operation in css ?
@media screen and (min-width < min-height)
I started writting a front-end library and I want "responsive" based on this condition.
You can use the window. innerHeight property to get the viewport height, and the window. innerWidth to get its width. let viewportHeight = window.
Because height is always vertical, either measurement, width or height, can be greater.
In an SVG document, the viewport is the visible area of the SVG image. You can set any height and width on an SVG, but the whole image might not be visible. The area that is visible is called the viewport. The size of the viewport can be defined using the width and height attributes of the <svg> element.
Media queries can be used to check many things, such as: width and height of the viewport. width and height of the device.
Check for the orientation
@media all and (orientation: landscape) {
body:after {
content: "width is greater than height"
}
}
@media all and (orientation: portrait) {
body:after {
content: "height is greater than width"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With