Is there a way to create desktop-only CSS? Or a way to work around this?

I have been looking at some media queries like these, but without luck so far:

@media (any-pointer: fine)
@media screen and ( -webkit-min-device-pixel-ratio: 0 )

Since I use desktop to simulate mobile as well (chrome dev tools), I cannot query high resolution. Because I want it to detect as desktop as well in my CSS.

Any ideas?

1 Answer 1


I figured out a way that does what I need:

  • Using @media (any-pointer: coarse) for touch screen only

And I found out it is possible to simulate a mobile device as desktop in chrome dev tools:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .