Hacker News new | past | comments | ask | show | jobs | submit login

When the content of your website only fills 60 percent of your mobile viewport and you can't zoom.



I just removed "maximum-scale=1, user-scalable=no", is that better? TBH I would have just copied that from somewhere assuming it was best practice :/


On line 402 in css/style.css, change `.wrapper` to

    .wrapper {
        width: 100%;
        padding: 10px 0;
    }


Yes, perfect, thank you. Deployed.


You could probably also change

    @media (max-width: 550px) .content { padding: 0 5px; }
but at that point it's more of a style preference.

(also, I just signed up for a HN account for this haha)


Well I agree with your style preference, deployed.


That is what Apple used to recommend but the general approach these days is to allow the user to scale however they want as long as it doesn't break your UI, and for accessibility reasons.


Thanks! Worst practice, actually. Now I'll finishing reading the article, looks exciting! :)


Iirc, Android has a setting in the disability/accessibility section to override zoom-blocking.


Dunno about android in general, but all the major browsers there should have a such an override option.




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

Search: