Live data from Hacker News

Just because I have a vertical screen doesn’t mean I’m on a phone

shkspr.mobi

201–210 of 399 posts

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#201
post #97

Earlier quoted context omitted.

Yes, and webdevs have been trying for over 10 years now to figure out how to get this right. Has no one just stopped to consider having a browser send a `prefersMobileView` or `viewport:phone` or anything like that? I can remember back a few years ago, an iPhone 6+, turned sideways could get a desktop view on some sites... simply because it met the requirements set by the author. Now, the author's assumptions were wr…

Mobile vs Desktop is not a clean division: screens run the full range of widths. Instead, developers should: * Lay out content based on the viewport width, in CSS pixels. * Use larger tap targets for coarse pointers ( https://developer.mozilla.org/en-US/docs/Web/CSS/@media/poin... ).

I had no idea that detecting coarse pointers was a thing, thanks for calling that out!

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#202

Wait, so sniffing on screen resolution is the way web developers distinguish desktops from mobile? That's just crazy . There should IMO be a preference sent, "I'm on a portable, touch-enabled device". I'm guessing it doesn't exist because it would add a bit to the fingerprint.

>"I'm on a portable, touch-enabled device". That's what the user-agent is[0]. And all major browser engines have/had a Mobile token on relevant devices. [0]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_de...

Google is moving toward that not being the case[0].

[0] https://www.zdnet.com/article/google-to-phase-out-user-agent...

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#203
post #163
post #150

Earlier quoted context omitted.

There is no bold.

𝗔𝗿𝗲 𝘆𝗼𝘂 𝘀𝘂𝗿𝗲?

Stop tricking people. Yes you can use unicode for all kinds of fun stuff, but that's not formatting, it's a hack.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#204

Wait, so sniffing on screen resolution is the way web developers distinguish desktops from mobile? That's just crazy . There should IMO be a preference sent, "I'm on a portable, touch-enabled device". I'm guessing it doesn't exist because it would add a bit to the fingerprint.

Screen resolution is, more or less the best approach. Layouts need to fit a size , not a device, so that's why media queries based on the screen size are usually the best approach. If I resize my browser to make it smaller, I should get a layout to match that. If I'm using Safari on iPad, docked to the side of the screen, I should get a layout to match that. These are all about screen sizes, not "mobile vs desktop".…

Best practice dictates "mobile-first responsive design" with "progressive enhancements." So designing first for mobile and touchscreens seems ideal, and then adding special features for larger resolutions, and, in a separate media query, for devices with (hover: hover).

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#205
post #61
post #48

Sites are not detecting a portrait screen and deciding that they're displaying on a phone. Someone who switches their monitor to portrait, or resizes a window to be taller than it is wide, is still going to get the desktop view. In this case the author is scaling their resolution, and so their browser is presenting itself to sites as 720px wide. Sites see that and show a layout optimized for a screen of that width. T…

Agreed completely. One mistake that designers/developers do though is to completely give up under 1000px so we get this swaths of whitespace and a hamburger. That’s a waste of estate and a waste of my time.

I've found sites using Material UI guidelines (heavy use of cards and navbar hamburger) especially culpable to this. Huge gap of greyish whitespace with a hamburger in the left.

Someone else mentioned bootstrap in the other thread too.

Maybe because these Frameworks are hugely popular, their defaults amplify the impact. Definitely these values are tweakable.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#206
post #203
post #163

Earlier quoted context omitted.

𝗔𝗿𝗲 𝘆𝗼𝘂 𝘀𝘂𝗿𝗲?

Stop tricking people. Yes you can use unicode for all kinds of fun stuff, but that's not formatting, it's a hack.

I’m sorry, it was not my intention to mislead anyone. Yes, it’s all trickery with copy-and-pasted Unicode bold characters.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#207

Earlier quoted context omitted.

> The author's proposed solution is for sites to use DPI instead This is untenable as well. You'll end up with microscopic websites on high DPI phone screens.

This should result in the website knowing that the screen is 7" inches (dots-per-inch / dots = inches) across and setting the style for small devices.

This requires the use of JavaScript to style a website.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#208

Earlier quoted context omitted.

>"I'm on a portable, touch-enabled device". That's what the user-agent is[0]. And all major browser engines have/had a Mobile token on relevant devices. [0]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_de...

Google is moving toward that not being the case[0]. [0] https://www.zdnet.com/article/google-to-phase-out-user-agent...

Client hints (proposed successor) are the same thing but more selective. That is a site has to request extra information rather being given right away. Among them are platform and mobileness.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#209

Earlier quoted context omitted.

If desktop + mobile make up >95% of your audience it's hard to justify the cost of creating a third set of rules for the rest.

That makes sense on the surface, but you should design for all possibilities, current and future. I learned this lesson the hard way. The client was on desktop. The users were 40% phones. Everything was great for months and months. Then one day the owner of the company that owned the company tried to look at the web site on her grandkid's iPad. Fan met shit that day.

that's something I don't understand. the Dev tools in Chrome and Firefox make it really easy to test through every resolution without problems. every UI change I make I view in all possible resolutions and its quite obvious of something breaks and I adjust accordingly.

Re: Just because I have a vertical screen doesn’t mean I’m on a phone

#210
post #178
post #77

Earlier quoted context omitted.

Yeah, I still very often get "here is the desktop design, here is the mobile design". Depending on who is developing the designs depends how that's going to translate. I have all the time in the world for developers that reflow the page and remove/adjust elements at different breakpoints (based on the design) between 'desktop' and 'mobile' so the experience is good for everyone. Sadly, most people don't bother.

I believe true webdesigners are in decline. You have lots of people who do this as a side gig after reading a few tutorials. In a way that’s a nice compliment for the accessibility of the tech, but not accessibility for the end user. Same with “We only tested this on Chrome.” of sites/apps, of which are there are many, as I can attest, as I never use Chrome.

> sites/apps

I don't think apps are as relevant to current discussion. For apps (not public websites), there are different requirements depending on the target audience.

I wouldn't be mad at a B2B web app being desktop only, no mobile CSS.

But I agree that web apps should still be compliant with safari + FF + Chrome.

Post reply on HN