text-size-adjust

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

text-size-adjust

Post by RSteinwand »

I decided to research this a bit today:

Code: Select all

body{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}
Because the "-webkit-text-size-adjust" property was used, it is recommended that the following missing property be added for improved compatibility: "-moz-text-size-adjust".
I found this: http://caniuse.com/#feat=text-size-adjust
If the viewport size is set using a <meta> element, the -ms-text-size-adjust property is ignored. See MSDN
I do have a meta element:

Code: Select all

<meta name=viewport content="width=device-width,initial-scale=1.0">
Now I need to figure out if I even want the text-size-adjust tags anymore. :?

I hope to scratch a few warnings off of every page by updating a couple templates and now that's not going to happen....
Rick
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: text-size-adjust

Post by RSteinwand »

Hi Albert,

So I decided to add -moz and drop -ms and ended up with this:

Code: Select all

-webkit-text-size-adjust:100%;-moz-text-size-adjust;text-size-adjust:100%;
I was puzzled by the response until I noticed I had left out something.
Because the "-webkit-text-size-adjust" property was used, it is recommended that the following missing properties be added for improved compatibility: "text-size-adjust", "-moz-text-size-adjust", and "-ms-text-size-adjust".
In my eagerness to put this error away I should have used this:

Code: Select all

-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;
The above code (missing :100% for -moz) did not generate an error tho. You might want to check into that.
Because the "-webkit-text-size-adjust" property was used, it is recommended that the following missing property be added for improved compatibility: "-ms-text-size-adjust".
Due to having the <meta> viewport setting, leaving the -ms-text-size-adjust out seems to be the preferred method. I know that we had trouble with iPhones logging into our website (some text was HUGE), until text-size-adjust was added. I just don't know if I need the rest of them.
Rick
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: text-size-adjust

Post by Albert Wiersch »

Thanks Rick. I will look into this early next week and see if I can do anything to refine the message.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: text-size-adjust

Post by RSteinwand »

Thanks Albert.
Rick
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: text-size-adjust

Post by Albert Wiersch »

Hi Rick,

The problem where the missing :100% was not found should be fixed in the next update.

I'm not sure what do to here though. I did some research and it may be best to leave the message as is.

As for "If the viewport size is set using a <meta> element, the -ms-text-size-adjust property is ignored. See MSDN", I went to that link:

https://msdn.microsoft.com/library/dn79 ... 2147217396

And I cannot find that info there so maybe it was removed or has changed?

Do you have a suggestion about updating or improving the message for text-size-adjust? Or should it be left alone? You can always change it yourself by right-clicking on it. Perhaps you'd want it to be a message instead of a warning.... or disable it altogether?
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: text-size-adjust

Post by RSteinwand »

Hi Albert,

The meta tag is documented here: https://msdn.microsoft.com/library/wind ... hCustomCSS

CanIUse shows the meta tag link only under the mobile tab under Windows Phone so it might only be a Windows Phone problem. https://developer.mozilla.org/en-US/doc ... ize-adjust

My opinion is that it shouldn't be suggested if the meta tag is present, but maybe mention it in the comments if other versions are missing. What do you think after reading those links?

I wish I knew if it was even needed for anything other than the iPhone.
Rick
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: text-size-adjust

Post by Albert Wiersch »

Hello Rick,

Thanks for the links. Here's what I did:

* I added this to the message: NOTE: If the viewport meta tag is present then Internet Explorer for Windows Phone ignores the value of the -ms-text-size-adjust property.

* It now doesn't suggest the -ms-text-size-adjust property if it knows there is a meta viewport tag (in this case the message ID will be different too so the messages can be individually controlled).

Does this sound good?
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: text-size-adjust

Post by RSteinwand »

Works for me!

Thanks.
Rick
Post Reply