Page MenuHomePhabricator

Revisit font-size units
Closed, InvalidPublic

Description

Using rems would:

  • Allow us to use relative sizes and prevent the CSS compounding effect
  • Have us need to define the root selector's font size (although, there's the possibility to define our own global CSS)
  • Improve accessibility by adjusting to the font size defined by the user

Using pixels would:

  • Prevent the CSS compounding effect
  • Prevent us from having to define the root selector's font size every time
  • Override the user custom font size set up

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Sarai-WMDE renamed this task from Revisit font-size values to Revisit font-size units.May 11 2021, 8:35 AM
Sarai-WMDE updated the task description. (Show Details)

rem would imply that design system has control over root font-size. But in MediaWiki, that's the skin's territory. So depending on rem will make the interface vary widely across themes. See T262928: Use opinionated `rem` setting across Wikimedia Foundation deployed skins for a possible way out of this problem.
px units are an accessibility no-go as users can't override them in settings. See https://github.com/wikimedia/stylelint-config-wikimedia/pull/105 and 104.

These are the reasons why we've remained on ems where necessary despite the compounding effect issue.

This ticket is no longer relevant because we're deprecating our legacy design system, WiKit (See T327532).