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

Bump font size to 12px #1034

Merged
merged 1 commit into from Aug 9, 2020
Merged

Conversation

siddharthvp
Copy link
Member

@siddharthvp siddharthvp commented Jul 11, 2020

Twinkle has been using a font-size of 11.44px (11px on monobook) on all UI dialog texts all these years. I think this is way too small that it causes accessibility issues for at least some users and is generally hard to read.

I propose bumping the morebits font-size to 12px. This change is subtle enough that it doesn't disturb the relative positioning of any UI elements, and would likely go unnoticed, but at the same time it does make things easier to read.

@@ -40,6 +40,7 @@ form.quickform
form.quickform *
{
font-family: sans-serif;
font-size: 12px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this and not removing font-size from .ui-dialog.morebits-dialog .morebits-dialog-content? https://github.com/azatoth/twinkle/blob/07fffdf04bf8adf008862eb2ac2e5cc52c28b9d9/morebits.css#L224

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of this more as a proposal so wasn't paying attention to the code. Let's see. Good old days of playing with the CSS...

@Amorymeltzer Amorymeltzer added the Module: morebits The morebits.js library label Jul 11, 2020
@Amorymeltzer
Copy link
Collaborator

Somewhat related, but I've been meaning on looking in on bumping some things up in size after looking at some of it for the jquery tooltip menus and earlier cleanup. Warranted IMO.

Comment on lines -189 to -191
body.skin-monobook .morebits-dialog {
font-size: 125%;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (at 0,2,1) was being over-ridden by the more specific .ui-dialog.morebits-dialog .morebits-dialog-content selector (0,3,0) so this wasn't doing anything at all.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it was doing something. I get 11.44px with, 11px without. More generally, shifts things around a bit. Continued below...

@siddharthvp
Copy link
Member Author

siddharthvp commented Jul 11, 2020

.morebits-dialog-content is almost same as .quickform (for scripts that use quickform) so I don't know which one is better off having the css rule.

Should we use percentages instead of pixels? It looks like 100% is 13px, so for 12px we'll need around 92.3%.

@Amorymeltzer
Copy link
Collaborator

So, as far as relevant items, we've got (top to bottom):

  • .morebits-dialog: small
  • body.skin-monobook .morebits-dialog: 125%
  • body .ui-dialog.morebits-dialog .ui-dialog-titlebar: 1em
  • .ui-dialog.morebits-dialog .morebits-dialog-content: 88%
  • .morebits-dialog-footerlinks: 90%

I haven't been able to do much testing today, but small on .quickform sets everyone to 13px afaict, would that be reasonable? I'm inclined toward %.

@Amorymeltzer Amorymeltzer added this to the August 2020 update milestone Jul 12, 2020
Copy link
Collaborator

@Amorymeltzer Amorymeltzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a bunch of screwin' around, and the number of possible combinations is a right pain to deal with. This looks good, does what it says on the tin, and doesn't break anything, so 👍

@Amorymeltzer Amorymeltzer merged commit b5c4fe5 into wikimedia-gadgets:master Aug 9, 2020
siddharthvp added a commit to siddharthvp/twinkle that referenced this pull request Sep 14, 2020
A thorough version of wikimedia-gadgets#1034.

Fixes the issue of font size not being scaled for users with uncommon browser font settings. Also makes the sizes consistent across all skins.

The px translation of the % sizes used are: (on the default browser settings)
- 12px in most places
- 12.96px (108% of 12px) for the titlebar and h5 headers
- 11.64px (97% of 12px) for footer links
On timeless, the sizes are very slightly different (12.008px instead of 12px, etc).

This PR touches only morebits.css. Left for the future:
- select2 css tweaks invloves a hardcoded 13px, which won't scale with browser font settings
- The large text option in TWPREFS also uses an absolute 13px

This is live on testwiki.
@siddharthvp siddharthvp deleted the fontsize branch October 22, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants