zachleat@zachleat.com’s Mastodon Archive

♻️ Reblog of Ana Tudor 🐯 (anatudor@mastodon.social)

You've probably used orientation media queries. But have you ever wondered which styles apply when the viewport is square?

Is it the landscape or the portrait ones?🤔

Well, just wondered about that & had to test. All browsers apply the portrait ones when the viewport is square.

If you want the landscape orientation styles applied when the viewport is exactly square, you can use an aspect ratio media query (for example, `min-aspect-ratio: 1/ 1`) 😼

#css #tinyCodingTips