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

Mini Button text is truncated on Android 4.4.2 #7746

Closed
dpolivy opened this Issue Oct 7, 2014 · 5 comments

Comments

Projects
None yet
5 participants
@dpolivy

dpolivy commented Oct 7, 2014

Repro: http://jsbin.com/zaxabifelaso/1

On Android 4.4.2 (and possibly other versions), mini-buttons seem to have their text truncated. Based on some experimentation, it appears to be related to the 12.5px font size used for these buttons. WebKit doesn't seem to handle them very well; by default I believe it rounds to the nearest integer size. Either way, it looks like the button isn't sized correctly, and thus the text is truncated.

Bad rendering:
image

Captured from the simulator (api19-x86) with this UA: Mozilla/5.0 (Linux; Android 4.4.2; Android SDK built for x86 Build/KK) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36

Good rendering example, from Android 4.3:
image

If you change the font size to 13px, then it renders correctly. And it renders correctly at 12.5px in pretty much every other browser I tried. I wasn't able to repro this in Chrome 30 on any other platform, so it must be something specific with the Android port or the version in that OS build.

Is there a specific reason for the decimal font size for mini buttons?

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Oct 7, 2014

Contributor

@jaspermdegroot is this something we can change easily?

Contributor

gabrielschulhof commented Oct 7, 2014

@jaspermdegroot is this something we can change easily?

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Jan 29, 2015

Member

The problem is gone on Android 5 so it's only an issue on 4.4.
I think it's not the 12.5px font-size on itself that triggers the bug, but the fact that we use em values for padding. Chrome had/has some roundings issues when ems are used for padding.

To be honest I don't know why 12.5px has been chosen as font-size for mini when the project started. We could consider changing it to 13px to avoid issues like this one.

Member

jaspermdegroot commented Jan 29, 2015

The problem is gone on Android 5 so it's only an issue on 4.4.
I think it's not the 12.5px font-size on itself that triggers the bug, but the fact that we use em values for padding. Chrome had/has some roundings issues when ems are used for padding.

To be honest I don't know why 12.5px has been chosen as font-size for mini when the project started. We could consider changing it to 13px to avoid issues like this one.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jan 30, 2015

Member

Yeah it seems like an on choice since not all browsers even support sub pixel rendering. I do however worry about breaking existing layouts?

Member

arschmitz commented Jan 30, 2015

Yeah it seems like an on choice since not all browsers even support sub pixel rendering. I do however worry about breaking existing layouts?

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot
Member

jaspermdegroot commented Apr 2, 2015

Ref #6787

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Apr 2, 2015

Member

I changed the font-size from 12.5px to 13px when updating button and icon CSS (1.5-css-and-demos branch).

Member

jaspermdegroot commented Apr 2, 2015

I changed the font-size from 12.5px to 13px when updating button and icon CSS (1.5-css-and-demos branch).

@jaspermdegroot jaspermdegroot added this to the 1.5.0 milestone Jul 16, 2015

@apsdehal apsdehal closed this May 8, 2016

@apsdehal apsdehal self-assigned this Aug 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment