Codex style guide
This is the design half of Codex — what to design and why. The
toolkit half — what's available and how to call it — lives in
codex-tokens,
codex-components, and
codex-icons;
codex-usage is the practical entry point
that ties them together.
It mirrors the four areas of the upstream Style Guide: Design
Principles, Visual Styles, Layout Guidelines, and Content
Guidelines. Canonical:
https://doc.wikimedia.org/codex/latest/style-guide/design-principles-overview.html.
Everything descends from the Statement of Purpose: "we design with
and for curious humans who rely on trustworthy content."
(https://doc.wikimedia.org/codex/latest/style-guide/statement-of-purpose.html)
The four design principles
Reach for these when you're unsure which of two options to ship.
1. Design with Others
Collaborate openly; include ideas and perspectives beyond your own.
- Is this design the outcome of collaboration?
- Did we listen to and learn from people with different backgrounds?
- Have we learned from the target audience that their needs are met?
2. For Curious Humans
Welcome a universal audience and remove barriers to knowledge.
- Is this design accessible, inclusive, and equitable?
- Does it allow for adaptability based on the person's preferences?
- Is there opportunity for wonder in the experience?
Practical heuristics:
- A reader's primary job is to read; an editor's is to edit.
Each feature should make the primary job easier, not interrupt it.
- Prefer inline affordances over modal flows where reasonable.
- Use progressive disclosure — a few common actions up front,
secondary ones in an overflow menu.
3. Trustworthy
Enable sharing and understanding of trustworthy knowledge while
protecting privacy.
- Are we minimizing the data we collect (in the design and the
process to create it)?
- Are we communicating information explicitly and honestly?
- Does it help users confidently access and share well-sourced,
reliable knowledge?
Show provenance for machine-assisted output rather than hiding it — see
references/machine-assistance.md.
4. Content First
Keep content at the centre; facilitate its comprehension and use.
- Is this prioritizing the most contextually important information?
- Is the content presented in a way that supports clear understanding?
- Does it make it easy to learn from, improve, and share content?
Corollary: minimise chrome. The content is the product — anything
beyond it competes for attention. When in doubt, be conservative; a
non-feature beats a noisy one.
Accessibility & bidirectionality
- Accessibility — aim for WCAG AA: never colour-alone, 4.5:1 / 3:1
contrast, keep focus rings, text alternatives, semantic markup. Detail:
references/accessibility.md.
- Bidirectionality — mirror layout/navigation/directional icons for
RTL; don't mirror URLs, numerals, time, check marks, media, or images.
Per-element rules:
references/bidirectionality.md.
Visual styles
- Colour usage — what colours mean, never-colour-alone, contrast:
references/colors.md.
- Typography — every piece of text uses one of the 9 canonical
styles; that rule has its own skill,
codex-typography. Residual readability
(line length, dynamic text):
references/typography.md.
- Icon design — reduce to essential, universal, neutral, geometric,
20 dp, RTL:
references/icons.md.
- Images — editorial selection:
references/images.md.
- Illustrations — empty states / onboarding, stroke & colour rules:
references/illustrations.md.
- Data visualization — chart anatomy, choosing a chart, palettes,
a11y symbols:
references/data-visualization.md.
Layout guidelines
- Links vs buttons + button hierarchy/order/spacing:
references/links-and-buttons.md.
- Constructing forms — usability, layout, fieldsets/modules,
validation, spacing, readonly vs disabled:
references/constructing-forms.md.
- Content overflow — wrap / ellipsis+tooltip / fade-for-scroll:
references/content-overflow.md.
Content guidelines
How the words in the UI should read, and how to disclose machine output.
- Voice & tone — neutral POV, second person ("your", not "my"), tone
that shifts with the task:
references/voice-and-tone.md.
- Writing for copy — needed / relevant / clear / concise /
consistent / accessible / translatable, plus word-choice traps:
references/writing-for-copy.md.
- Machine assistance — center the human, give just enough info,
choose a disclosure level, label generated output:
references/machine-assistance.md.
Applying these in a design review
Before you call a piece of work done, walk through this checklist:
Upstream sources
1---2name: codex-style-guide3description: The Wikimedia / Codex Style Guide — the design-decision companion to the Codex toolkit. Covers the four design principles (Design with Others, For Curious Humans, Trustworthy, Content First), accessibility, bidirectionality, visual styles (colour usage, typography/readability, icon design, images, illustrations, data visualization), layout guidelines (links vs buttons, forms, content overflow), and content guidelines (voice & tone, writing for copy, machine assistance). Use when making a UX call ("dialog or inline edit?"), choosing colours/type/imagery, laying out a form, writing UI copy, labelling AI-assisted output, or sanity-checking a design.4---56# Codex style guide78This is the **design** half of Codex — *what to design and why*. The9**toolkit** half — *what's available and how to call it* — lives in10[`codex-tokens`](../codex-tokens/SKILL.md),11[`codex-components`](../codex-components/SKILL.md), and12[`codex-icons`](../codex-icons/SKILL.md);13[`codex-usage`](../codex-usage/SKILL.md) is the practical entry point14that ties them together.1516It mirrors the four areas of the upstream Style Guide: **Design17Principles**, **Visual Styles**, **Layout Guidelines**, and **Content18Guidelines**. Canonical:19<https://doc.wikimedia.org/codex/latest/style-guide/design-principles-overview.html>.2021Everything descends from the **Statement of Purpose**: _"we design with22and for curious humans who rely on trustworthy content."_23(<https://doc.wikimedia.org/codex/latest/style-guide/statement-of-purpose.html>)2425## The four design principles2627Reach for these when you're unsure which of two options to ship.2829### 1. Design with Others3031Collaborate openly; include ideas and perspectives beyond your own.3233- Is this design the outcome of collaboration?34- Did we listen to and learn from people with different backgrounds?35- Have we learned from the target audience that their needs are met?3637### 2. For Curious Humans3839Welcome a universal audience and remove barriers to knowledge.4041- Is this design accessible, inclusive, and equitable?42- Does it allow for adaptability based on the person's preferences?43- Is there opportunity for wonder in the experience?4445Practical heuristics:4647- A reader's primary job is to **read**; an editor's is to **edit**.48 Each feature should make the primary job easier, not interrupt it.49- Prefer **inline** affordances over modal flows where reasonable.50- Use **progressive disclosure** — a few common actions up front,51 secondary ones in an overflow menu.5253### 3. Trustworthy5455Enable sharing and understanding of trustworthy knowledge while56protecting privacy.5758- Are we minimizing the data we collect (in the design _and_ the59 process to create it)?60- Are we communicating information explicitly and honestly?61- Does it help users confidently access and share well-sourced,62 reliable knowledge?6364Show provenance for machine-assisted output rather than hiding it — see65[`references/machine-assistance.md`](references/machine-assistance.md).6667### 4. Content First6869Keep content at the centre; facilitate its comprehension and use.7071- Is this prioritizing the most contextually important information?72- Is the content presented in a way that supports clear understanding?73- Does it make it easy to learn from, improve, and share content?7475Corollary: **minimise chrome.** The content _is_ the product — anything76beyond it competes for attention. When in doubt, be conservative; a77non-feature beats a noisy one.7879## Accessibility & bidirectionality8081- **Accessibility** — aim for WCAG AA: never colour-alone, 4.5:1 / 3:182 contrast, keep focus rings, text alternatives, semantic markup. Detail:83 [`references/accessibility.md`](references/accessibility.md).84- **Bidirectionality** — mirror layout/navigation/directional icons for85 RTL; don't mirror URLs, numerals, time, check marks, media, or images.86 Per-element rules:87 [`references/bidirectionality.md`](references/bidirectionality.md).8889## Visual styles9091- **Colour usage** — what colours mean, never-colour-alone, contrast:92 [`references/colors.md`](references/colors.md).93- **Typography** — every piece of text uses one of the **9 canonical94 styles**; that rule has its own skill,95 [`codex-typography`](../codex-typography/SKILL.md). Residual readability96 (line length, dynamic text):97 [`references/typography.md`](references/typography.md).98- **Icon design** — reduce to essential, universal, neutral, geometric,99 20 dp, RTL: [`references/icons.md`](references/icons.md).100- **Images** — editorial selection:101 [`references/images.md`](references/images.md).102- **Illustrations** — empty states / onboarding, stroke & colour rules:103 [`references/illustrations.md`](references/illustrations.md).104- **Data visualization** — chart anatomy, choosing a chart, palettes,105 a11y symbols:106 [`references/data-visualization.md`](references/data-visualization.md).107108## Layout guidelines109110- **Links vs buttons** + button hierarchy/order/spacing:111 [`references/links-and-buttons.md`](references/links-and-buttons.md).112- **Constructing forms** — usability, layout, fieldsets/modules,113 validation, spacing, readonly vs disabled:114 [`references/constructing-forms.md`](references/constructing-forms.md).115- **Content overflow** — wrap / ellipsis+tooltip / fade-for-scroll:116 [`references/content-overflow.md`](references/content-overflow.md).117118## Content guidelines119120How the words in the UI should read, and how to disclose machine output.121122- **Voice & tone** — neutral POV, second person ("your", not "my"), tone123 that shifts with the task:124 [`references/voice-and-tone.md`](references/voice-and-tone.md).125- **Writing for copy** — needed / relevant / clear / concise /126 consistent / accessible / translatable, plus word-choice traps:127 [`references/writing-for-copy.md`](references/writing-for-copy.md).128- **Machine assistance** — center the human, give just enough info,129 choose a disclosure level, label generated output:130 [`references/machine-assistance.md`](references/machine-assistance.md).131132## Applying these in a design review133134Before you call a piece of work done, walk through this checklist:135136- [ ] Does it prioritise the content over its own chrome?137- [ ] Does it use real or realistic data, including failure and "long"138 states (long titles, RTL, formulas, infoboxes)?139- [ ] Does it work with keyboard only, and meet AA contrast?140- [ ] Does it work in dark mode and at mobile width?141- [ ] Does it mirror correctly for RTL?142- [ ] Does the primary user job get easier — or harder?143- [ ] Is any machine-assisted output disclosed honestly?144- [ ] Is the copy neutral, concise, and translatable?145- [ ] Have we resisted adding something just because we could?146147## Upstream sources148149- Style Guide overview:150 <https://doc.wikimedia.org/codex/latest/style-guide/design-principles-overview.html>151- Statement of Purpose:152 <https://doc.wikimedia.org/codex/latest/style-guide/statement-of-purpose.html>153- Additional content resources:154 <https://doc.wikimedia.org/codex/latest/style-guide/additional-resources.html>