From bdee36ca7cf6ebe26d53fb599cb0792532a7250a Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 14 Jan 2026 12:07:37 +0100 Subject: [PATCH] doc: add recommendation to use compound typography component (#31715) * doc: add recommendation to use compound typograpghy component * Update code_style.md Co-authored-by: R Midhun Suresh --------- Co-authored-by: R Midhun Suresh --- code_style.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code_style.md b/code_style.md index 6e7289d22e..e5b1cdf814 100644 --- a/code_style.md +++ b/code_style.md @@ -272,6 +272,8 @@ Inheriting all the rules of TypeScript, the following additionally apply: 18. Components should serve a single, or near-single, purpose. 19. Prefer to derive information from component properties rather than establish state. 20. Do not use `React.Component::forceUpdate`. +21. Prefer to use [compound typography components](https://compound.element.io/?path=/docs/compound-web_typography--docs) instead of raw HTML elements for text. This ensures consistent font usage and letter spacing across the app. +22. If you can't use 21, don't forget to apply the correct CSS classes for font and letter spacing. ## Stylesheets (\*.pcss = PostCSS + Plugins)