Background
In T393524 we've discovered another page element –Vector's sticky header– as part of the interface which shouldn't be scaled with font modes in current product agreement.
See patch comments so far, which resulted in this task:
Jon Robson 05-06: The vector-feature-custom-font-size-clientpref--excluded class is only intended for usage on the HTML element. I don't want to see it propagate elsewhere as that will be confusing and might lead to unexpected usages in article and will likely lead to unexpected/undesired behaviours. The class is very tied to client preferences. If we want to exclude particular elements in the page, we should design a new class with that in mind (e.g. similar to notheme which opts out of dark mode styles). We could then also apply it to the existing cdx-message element (see the TODO comment in resources/skins.vector.styles/CSSCustomProperties.less added in https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1138478) Would suggest either: 1) new class 2) making use of a role attribute (or similar) and adding that to resources/skins.vector.styles/CSSCustomProperties.less 3) expanding the TODO to apply to existing sticky header HTML until we have a general solution Note: I was not aware of https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/QuickSurveys/+/198bc52a113857c6132e5efee91fb9d2900a0735 so we should clean this up too. Volker E. 05-06: […] A new class sounds most reasonable as [role] seems like a misuse of a thing meant for a very different scope as well, similar to what you're flagging here. I will expand the TODO for now, as I'm a bit cautious about defining a new class not getting in time for next weeks roll out of beta. What could be a class name for such? notheme has always bugged me from inclusion perspective for non-English speakers, it should be no-theme. AnneT 06:53: Would it be possible to set up the small font mode (14px base) tokens on :root, then only change --font-mode-medium and --line-height-medium (and, eventually, all font-size and line-height tokens via Codex font mode mixins) based on the clientpref in the content section, where we actually want things to scale? That would mean not having to exclude a bunch of different areas and features from scaling. If so, we could that as part of the work to integrate the Codex font modes into Vector 2022, and we may want to avoid introducing a new class now just for it to be removed later. If not, I agree that we should create the new class. no-scale would fit with notheme, although neither class is completely self-explanatory IMO. Volker E. 08:27: Maybe .no-design-mode or clearer .no-font-mode? Reason is no-mode could mean a lot of different things. Also I'm wondering if we ever run into the issue that we care about a number of no modes altogether (I was actually posing that question in a DST internal discussion that led us to the different resets and a general reset, where the application of a general reset is questionable).
Goal
With @Jdlrobson feedback in on original approach, the problem shouldn't be tackled with the .vector-feature-custom-font-size-clientpref--excluded which is meant for body class full page exclusions only.
Discuss and find the best general solution (class or :root solution)
Temporary workaround
As a temporary solution, we will use a new class, .no-font-mode-scale, instead of .vector-feature-custom-font-size-clientpref--excluded. The new class will be clearly marked as unstable to discourage its use outside of this context.
We'll discuss a long-term solution in T393739.
Acceptance criteria for done
- Agree on short-term approach
- Implement short-term solution
- Replace former patch approaches of "misusing" .vector-feature-custom-font-size-clientpref--excluded class