Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Include `text-size-adjust: 100%;` or not #13
I see that
If this is going to be included, I think a better description would be used:
Ah, this is really helpful info. I think I grabbed that line of code out of another reset-type project without researching it (yet). From what you described, I don't think we want to include this. Resizing text on orientation change sounds like something Apple put there on purpose.
Other people's thoughts?
We / I should test a demo...
I've had to turn it off on multiple projects where I was doing responsive design and making sure that my text size was intentional. It can cause unexpected reflow and positioning bugs if you've taken care to design the text for those sizes/orientations and are hit with a sudden text-zoom.
(Edit: AFAIK, apple included it because a lot of old websites had tiny fonts, and people were switching orientation and zooming in in order to make the text legible, so they included that as default behavior)
Reboot (Bootstrap's reset), Sanitize, and Normalize all include some variation of this.
None of the older resets do. (Makes sense, they are older than the iPhone, but since so many people still use them, those folks are living without this "fix".)
Interesting that none include
They are attempting to target only iPhone and Windows phone.
Browser support is interesting: https://caniuse.com/#search=text-size-adjust. For example, it's in Firefox for Android (prefixed), but not desktop.
The purpose of this property is described here: https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust
This does nothing on my iPhone. Nothing. With or without the viewport metatag. There's a note on Can I Use about a bug in Safari 5.1, but every since then, Can I Use reports this as not-supported.
The note on Can I Use says "If the viewport size is set using a element, the -ms-text-size-adjust property is ignored." So it doesn't do anything for Windows Phone either, if a site is build to be responsive.
I think we can safely assume that any website being build today is being built with a viewport metatag, to be responsive or intrinsic. Well, that's not always true, but I don't think this project can help people who are still building fixed-width 960-wide websites.
So, in conclusion, it looks like this does nothing. And isn't needed. And only sticks around in our code because no one has looked into it in years.
Ah, the legacy of habits.... well, bubuyeeeee....