Skip to content

Comment on Downgrade User Agent Client Hints to 'harmful'parent

Comments

Why would you need different templates for mobile/desktop? CSS is quite capable responding to any screen orientation.

Yes it is. Except you can't use the same markup for both because the input devices, and thus interaction paradigms, are so radically different. Mice are precise and capable of hovering over things, so it makes sense to pack everything densely and add various tooltips and popup menus. Touchscreens are imprecise and don't have anything resembling hovering, so UI elements must be large, with enough padding around them, and with menus appearing on click.

Between CSS Flexbox and CSS Grid there shouldn't any reasons today that you can't handle 100% of those differences with the same markup and media stylesheets. (There's also obviously JS if you really must contort the HTML DOM to get what you want.)

You're not wrong. However, there are times when CSS isn't enough. For example:

- The Mobile vs Desktop design differences are too great.

- The site was originally created without considering mobile, and retrofitting mobile support is unfeasible.

Can you expand on the design differences?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.