question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Form elements do not scale well if only font size increased

See original GitHub issue

If you zoom text only in Firefox, select elements retain their 40px height but the text within them becomes larger and therefore cropped from the bottom edge.

Screen Shot 2019-08-01 at 14 30 10

Doesn’t seem to be as much of a problem for text inputs.

Can’t reproduce the problem in Chrome because the zoom text only option isn’t available.

Noticed this during user testing on a phone of GOV.UK’s search, specifically where we have select elements in finders.

(can’t remember what kind but possibly an iPhone 7?)

Side note: doing this on the Design System site causes the currently active menu item to be crossed out instead of underlined:

Screen Shot 2019-08-01 at 14 31 28

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
36degreescommented, Aug 7, 2019

It looks like this can affect text inputs, but only at extreme values (I had to modify the values for toolkit.zoomManager.zoomValues and zoom.maxPercent in Firefox’s about:config to do this):

Screen Shot 2019-08-07 at 16 02 06

We’d probably also want to scale text inputs and buttons at the same time to ensure that they remain aligned – so I’m going to rename this to ‘form inputs do not scale well…’.

1reaction
NickColleycommented, Aug 2, 2019

The main issue with ‘em’ and ‘rem’ when using it with the legacy GOV.UK Template is that GOV.UK Template messes with the root font size, which is likely what you’re seeing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - Font scaling based on width of container - Stack Overflow
My reasoning is that things like my menu become squished when you resize, so I need to reduce the px font-size of .menuItem...
Read more >
C17: Scaling form elements which contain text - W3C
The objective of this technique is to ensure text-based form controls resize when text size is changed in the user agent. This will...
Read more >
font-size | CSS-Tricks
The font-size property specifies the size, or height, of the font. font-size affects not only the font to which it is applied, but...
Read more >
font-size - CSS: Cascading Style Sheets - MDN Web Docs
The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length>...
Read more >
How to Override Root Font Size to Create a Better User ...
So if we try to convert px values into rem, we'll need to do some math. Suppose we want to set the font-size...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found