-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
.ir not working correctly on Android #1108
Comments
Thanks. I'm going to look into possibly reverting the IR technique we use. |
It looks like it's because my element is an anchor... |
Have you set it to |
block. If I set it to inline-block, the space of the contained text is maintained and there is is an awkward white-pace above the image (the height of the element's font-size). |
I can also confirm this error, tested it with 2 devices (Android 4 and 3), both had this error. I usually just set a text-intend fix in a mq to have at least a workaround, but still, thats definitly not a proper solution. |
I remember having this issue, but I just can't reproduce it... >.< Everything I tried in this fiddle worked: Last fiddle is 13... http://jsfiddle.net/bKHFm/13/ What I am thinking is it might be some other things that this |
I figured out what it was (at least in this specific case). It was picking up the :visited pseudo-class which would override the color: transparent on the .ir class. Not sure if it's a specificity thing or not. The :visited styles were coming from normalize.css. So I guess an ugly fix would be to do:
Not sure if you'd have to compensate for other pseudo-classes as well. The real problem is probably that Android devices may not like "font: 0/0 a". |
I think that nothing should happen if you overwrite just |
Maybe the Android browser has a minimum font-size? Can anyone confirm this? Because in the recent project where I saw this behavior, the visible font-size was definitly greater than 2px (No font-size was set prior to .ir - but a color for the #footer a instead). UPDATE: Made a jsfiddle for all cases, it seems that Android definitly sets a min. font-size. http://jsfiddle.net/tnwjT/3/ Case 1: Nothig special, a standard image replacement without a prior set font-size / color declaration. Case 2: Image replacement with a prior set color declaration. Case 3: Image replacement with a prior set font-size declaration. Case 4: Image replacement with a prior set font-size AND color declaration. Case 5: Fixed |
Yeah, all those declarations should really be using I think we should weight up the pros and cons of various approaches again (before we make another stable release) and decide which set of bugs are the least common. |
Will be addressed as part of a wider reassessment of the IR technique. |
The .ir class doesn't seem to be working on Android. The image is showing up, but the text is as well (over the image). It looks correct on regular desktops, but not on android devices (at least some that I've tested).
Here is my markup.
The text was updated successfully, but these errors were encountered: