Background
- Description: Currently in a huge number of skins and extensions, Gray 100 #f8f9fa and Gray 200 #eaecf0 ]] are used as backgrounds in various places to add visual structure to the layout. So far we have defined both values only in component specific tokens, that shouldn't be used for the structure case for semantic reasons.
- History (if needed): In mediawiki.ui/variables are featuring colorGray14 and colorGray15 which are (mis)used for exactly that reasons, to structure layouts
- Known use case(s):
- wikitable table header are among the more clearly defined use cases,
- others in CodeSearch for #f8f9fa and in CodeSearch mediawiki.ui var/hex code for #eaecf0
- Special:Search: .searchResultImage-thumbnail-placeholder, #mw-searchoptions, Special:Contribute: .mw-contribute-tabs-content
- pre, code, .mw-code backgrounds
Previous implementations
- Codex demo: Codex background-color token demo
- Design style guide: In the DSG both colors are used too, the lighter as image figure background, the darker as page background (header).
User stories
As designer, there are page/view layout structuring needs, where subtle grays Gray 100 and Gray 200 are used for.
Design spec
Open questions
- Nomenclature semantically important
- Considerations: Nomenclature definition:
- @background-color-light/@background-color-lightest or
- background-color-page-xxx or
- background-color-area-xxx
- Considerations: Nomenclature definition:
Decision: We've turned the decision on the head and went for naming the interactive backgrounds intentionally. It's clearer in the bigger token application, as most interactive elements are aimed to come out of premade Codex components, while page layouts will be mixed inside and majority outside Codex via skin variables.
Acceptance criteria for Done
Design
- Design the Figma spec sheet and add it in this task
- Add the new tokens as Figma variables in the library. This step will be done by a DST member.
- Replace the color tokens in the components needed: Framed Tabs background, Thumbnail Placeholder, and ChipInput (when chips are separated from the input)
Code
- Implement the tokens in Codex
- Update downstream repositories, orienting on T332541 to resolve this application gap
- Update components that use this token (if needed) https://gerrit.wikimedia.org/r/c/mediawiki/core/+/997978