Navigation Menu

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

Change internal font size from from 15 to 10 #4725

Merged
merged 6 commits into from Jun 8, 2020

Conversation

JorikSchellekens
Copy link
Contributor

This is identical to #4706

We feared that using non integer rem values would cause strange rounding artefacts. We had done some testing which showed that largely this wasn't a worry. However, I've run into the a strange bug on chrome, mac OS (not safari or firefox) which uses a different rounding for vertical and horizontal values. It effects the third decimal significantly. It's usually unoticable but on small circles it's glaring. There was a work around for the toggle switches but now the new radio buttons were looking very disproportionate.

This pr changes our internal base font to 10, making the value of all our $font-Xpx variables a single decimal place long which don't suffer from the rounding problem.

The artefact doesn't show up when you change the base with the slider using the new single decimal place rem values. So, Chrome must be rounding early.

Before:
image

After:
image

@JorikSchellekens JorikSchellekens merged commit 349d7a5 into develop Jun 8, 2020
@JorikSchellekens JorikSchellekens deleted the joriks/font-scaling-unit-change branch June 8, 2020 12:46
jryans added a commit that referenced this pull request Jun 22, 2020
In #4725, we changed the
internal font size from 15 to 10, but the `toRem` function (currently only used
for read receipts remainders curiously) was not updated. This updates the
function, which restores the remainders.

Fixes element-hq/element-web#14127
jryans added a commit that referenced this pull request Jun 22, 2020
In #4725, we changed the
internal font size from 15 to 10, but the `toRem` function (currently only used
for read receipts remainders curiously) was not updated. This updates the
function, which restores the remainders.

Fixes element-hq/element-web#14127
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.

None yet

2 participants