Codex is going to introduce alternate type scales as part of T387778 (a general overview of this feature can be found in ADR 13).
This means that going forward, we'll need a way to document and demo Codex components in all supported type scales – for now that includes the "small" scale (base size 14px, corresponding to what Wikipedia's Vector skin uses and what most desktop users see) and a default size (base size 16px, corresponding to the Minerva skin and what mobile users of Wikipedia see – this is the scale used in the docs site by default as well).
In order to provide designers and developers with accurate component docs/demo pages, we need to introduce a font-size switcher element to the Codex docs Vitepress site.
Acceptance criteria
- Font mode switcher should integrate in the existing Vitepress menu system as much as possible (avoid building a custom appearance control UI for now)
- Font mode switcher should exist alongside the existing color mode switcher (which is an out-of-the-box Vitepress feature that we have customized)
- Font mode switcher should allow the user to toggle between "small" and "default" font sizes – when this toggle happens, the appropriate set of font-mode tokens will be loaded and some styles will update on the page. This needs to update all component styles; if some docs styles don't respect font modes yet that's something that can be addressed in a follow-up task.