Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can we at least add this meta tag in the head of the document ? I don’t know if it is considered styling but it is not css. My eyes will thank you:

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
Source: https://stackoverflow.com/a/39239194


It is considered CSS [1], which makes sense to me as this relates to styling. What has never made sense in my mind is to have completely unstyled pages rendered with microscopic fonts on smartphones. Doing so for old sites that, at the beginning of the mobile revolution, assumed on their CSS sheets 1024px wide screens is reasonable (though still debatable). Not so for CSS-free pages, whether they were authored in 1991 or in 2023.

I'm sorry if I got carried away, I wasn't replying to you in this last part :) For the record, I would also make this exception, though it would be neat to be able to select those without even the meta viewport tag.

[1] https://drafts.csswg.org/css-viewport/


No problem, really. Thanks for the correction. This is indeed css. I must have automatically associated meta tags to non css data only. And I totally agree with you concerning the microscopic font and the meta tag.


I don't understand why it has to be added to every single page. Is there a reason this is not implemented as a default browser behaviour for devices where it matters (i.e. mobile phones)?


That'd force a pretty substantial breaking change to a lot of sites that don't currently use the tag.


If the webpage has no CSS at all then nothing will be broken, either adding it internally or pretending that it's included.


Webdevs can always say those aren't their target audience.


All you need is initial-scale=1.0, and width is redundant.

I discuss this in more detail here: https://news.ycombinator.com/item?id=36112889


That applies only to Safari. How about other browsers?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: