0

I'm doing a mobile-first approach but now I need to target desktop browsers only to style the scrollbars in chrome.

  • @media (min-width: X) isn't what I'm looking for, I really want to target the device
  • @media not handheld doesn't work because iOS and android think they're not handhelds

I know that @media only screen should target mobile devices but what is the opposite? The closest I came was @media not only screen but that doesn't work.

EDIT: To clarify. With mobile-first I mean that I don't want to style the scrollbars for all devices and then make an exception for mobile. I want it the other way around: mobile should be the default, desktops are the exception

EDIT 2: More clarification. I'm not looking to target desktop because of a breakpoint in size, I want to target capabilities and/or behaviour. For example, using the :hover selector on mobile is bad because touchscreens don't have mice but they DO activate that selector when you tap an element and then never de-activate it until you tap something else. They treat it as :focus. So I would not want to declare that except for desktop (again, desktop should be the exception here, not the other way around).

REJH
  • 3,273
  • 5
  • 31
  • 56
  • Possible duplicate of [Media Queries: How to target desktop, tablet and mobile?](http://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile) – AG_ Apr 02 '17 at 07:03
  • I don't think so, looks like they're using min-(device-)width but there is a lot there, I'll have a thorougher look. – REJH Apr 02 '17 at 07:07
  • Nope, they all use dimensions for their media queries and (unless I'm overlooking something) there is not a single rule that selects desktop-only. I would trigger every single rule if I would just keep making my browser window smaller. – REJH Apr 02 '17 at 07:14
  • (see updated question, edit 2) – REJH Apr 02 '17 at 07:15

0 Answers0