Live data from Hacker News

The ideal viewport doesn't exist

viewports.fyi

41–50 of 202 posts

Re: The ideal viewport doesn't exist

#41

Landscape on mobile is the least well supported configuration I know. Static headers/footers commonly take 50% or more vertical space with no way to dismiss or shrink them.

> no way to dismiss or shrink them You can shrink them by rotating your phone back to the correct, portrait orientation.

Or shrink everything to unreadable sizes with "Desktop site".

Re: The ideal viewport doesn't exist

#42
There's an elephant in the room here, and it's Adobe.

The author's put forward a lot of valid criticisms of the breakpoint-based approach & also provided a really good guide to doing proper web design, but what's skipped over is that their guide only works for developer-designers, & won't fit the workflow of a large proportion (majority?) of people doing visual design for web. Those designers are have backgrounds in multimedia or have academic backgrounds in design-forward colleges with extremely poor html-css modules. And their tool is Creative Suite - largely because Adobe has a stranglehold on design education.

The likes of Sketch have shaken things up somewhat so we at least have XD, and slightly fewer people are designing entire websites in Photoshop & Illustrator alone, but even so - the ability of tools like XD/Figma to allow the designer to model their work fluidly in a way that matches web viewports is not mature, not least because Adobe have been historically hostile to the idea (XD being a very reluctant response to new competitors after already killing off Fireworks).

Re: The ideal viewport doesn't exist

#43
post #24

That masonry layout diagram is horribly deceptive. The boxes aren't to scale at all.

I see it often, and I hate it. It standardises on width, so everything that's wide (landscape oriented photos, or in this case desktop windows) gets shrunk dramatically.

In this particular case, it makes the largest viewports look the smallest, and makes the smallest ones look largest. It's indeed very deceptive.

Re: The ideal viewport doesn't exist

#44

Earlier quoted context omitted.

You've never seen a 17"+ laptop I guess?

[flagged]

I recently bought a 4K screen specifically to be able to have an IDE and a browser next to each other. Every once in a while there's an app that thinks that all of that screen real estate is really all just for them. It's not.

Re: The ideal viewport doesn't exist

#45
This article was great! I think the overall premise is probably more useful for graphic designers than programmers, because I believe many programmers kind of implicitly know this advice. However I’ve worked with graphic designers in the past that were obsessed with having their Figma design translate to the web page in a pixel perfect manner, and they would always be confused when things didn’t align correctly. This inevitably leads to breakpoint Hell, where they design pixel perfect designs for tons of breakpoints and ask you to implement them.

While this is laudable, I think it’s important to remember that a design should focus more on how the layout flows when resizing the viewport and focusing on a couple target breakpoints. I think that’s what this article is trying to emphasize.

Re: The ideal viewport doesn't exist

#46

Landscape on mobile is the least well supported configuration I know. Static headers/footers commonly take 50% or more vertical space with no way to dismiss or shrink them.

> no way to dismiss or shrink them You can shrink them by rotating your phone back to the correct, portrait orientation.

It also happens on tablets and notebooks, in particular with larger font sizes or zoom factor configured.

Re: The ideal viewport doesn't exist

#47

I was hoping to read some kind of solution at the end of all this huge text. Some radical way to do layouts without using viewports. Instead I got a link to buy a book from some author. Why is this even here? This is a long ad with useless data points.

There is, it's called flexbox and the CSS grid.

I've found that on simple websites a lot of problems are solved with just a few lines of flexbox config (flex-wrap, etc)

Re: The ideal viewport doesn't exist

#48
post #5

I wish more pages took the pointer and resolution media queries into account. So many times I open windows side-by-side on my desktop and end up with the menu collapsing into a hamburger menu which fills the entire screen when clicked. Many phones today have very high DPI and very low precision in touch, so it makes sense to have massive visual elements and buttons, but my desktop with the same size in pixels as my p…

I'm actually not entirely sure what you're talking about.

I'm very familiar with websites switching to mobile layout with hamburger menu instead of a navigation bar, when you reduce the width of the browser window on your desktop. BUT I don't think I've ever come across a resolution change where the website elements (either hamburger menu or content) get massively larger.

Can you provide an example of one or two mainstream sites that change resolution like that?

The reason I'm confused is because in CSS everything is based on logical pixels, not actual device pixels. E.g. a "1 px" width will be 2 or 3 hardware pixels wide on an iPhone. Similarly "1 em" will be 16 hardware pixels on a standard resolution display, but 32 or 48 hardware pixels on a 2x or 3x display. So web designers don't have to do anything special to accomodate hi-DPI screens in the first place.

Re: The ideal viewport doesn't exist

#49

Earlier quoted context omitted.

You've never seen a 17"+ laptop I guess?

[flagged]

I have a 27" display and browse with the browser window maximized. I paid for this display, and I expect to use every pixel. Web designers, however, seem to hate me for it and choose to constrain the width of their content to a tiny, 6cm column down the middle of my display, leaving 80% of the width as whitespace.

Re: The ideal viewport doesn't exist

#50
post #25

Earlier quoted context omitted.

It doesn't work like that. Web browsers do not count actual pixels when rendering. They adjust high density pixels to the equivalent real life size of low density pixels.

The OP is talking about things like media queries that only look at screen width and imply other things like input method from that. IIRC SquareSpace does exactly what they're saying: on desktop sites will have a horizontal list of links but on mobile it's a hamburger icon that takes over the entire viewport when clicked. Functionality exists to target pointer type and things like that in media queries, it's just ver…

But that's what you want, no? I just visited SquareSpace and their homepage seems to work as I'd want. When my viewport is narrow enough that there isn't space for the horizontal navbar at the top, it switches to hamburger menu.

Surely this is better than cutting off the navbar and half the page content in the middle vertically, and requiring the user to scroll horizontally?

Post reply on HN