Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What I use is @media (pointer: coarse) and (hover: none) { If you have a mouse plugged in, you get the desktop design.


I don't differentiate by type of device. I just detect aspect ratio:

@media (min-aspect-ratio: 1/1) /* wide */

@media (max-aspect-ratio: 1/1) /* tall */

@media (aspect-ratio: 1/1) /* square */


And what do you think the aspect ratio tells you? People do use portrait orientation for monitors or windowed mode for browsers.


It tells me which axis is longer, so I can responsively move the menu there. Also I flow content differently - lists get columns if wide enough.

Here, play with your window width to see: https://hypertele.fi/0000000000000000




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: