5 ms·
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 na
by excusemyfrench 3y ago
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 https://stackoverflow.com/a/39239194
- ezequiel-garzon 3y agoIt 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/ https://drafts.csswg.org/css-viewport/
- excusemyfrench 3y agoNo 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.
- lapcat 3y agoAll 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 https://news.ycombinator.com/item?id=36112889
- xigoi 3y agoThat applies only to Safari. How about other browsers?
- kkoncevicius 3y agoI 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)?
- OtherShrezzing 3y agoThat'd force a pretty substantial breaking change to a lot of sites that don't currently use the tag.
- ezequiel-garzon 3y agoIf the webpage has no CSS at all then nothing will be broken, either adding it internally or pretending that it's included.
- GoblinSlayer 3y agoWebdevs can always say those aren't their target audience.
- deleted 3y ago[deleted]