Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable incorrect iOS/Edge text size adjustments #1178

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Feb 7, 2019

To cater for non-responsive "desktop only" websites, iPhone OS launched with a feature to increase the text size automatically so it was more legible:

To prevent font size tampering, it can be turned off with:

html {
    -webkit-text-size-adjust: 100%;
}

auto text adjustment

It's also supported by:

  1. Windows Phone 8.1
  2. Windows 10 Mobile
  3. Microsoft Edge

In Edge, it appears to kick in for portrait tablet mode on smaller non-pro Microsoft Surfaces.

Since GOV.UK Frontend already takes care of typography, we should opt out of this as shown:

Before

19px text in .govuk-list has been "boosted" to 25px (auto sizing)
before

After

19px text .govuk-list remains correctly at 19px (set to 100%)
after

Also found in CSS resets (normalize.css, Bootstrap) and prevents the subtle "zoom in" when rotated.

Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this does exist in GOV.UK Template, but wasn't bought through.

Gets a thumbs up from me – thanks @colinrotherham.

We just need another approval from someone else on the team and then we can merge this.

Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good PR thanks Colin 👏

@NickColley NickColley merged commit 0685be5 into alphagov:master Feb 8, 2019
@aliuk2012 aliuk2012 mentioned this pull request Feb 8, 2019
@aliuk2012 aliuk2012 added this to the v2.7.0 milestone Feb 11, 2019
@colinrotherham colinrotherham deleted the text-size-adjust branch March 4, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants