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 <hi@midhun.dev> --------- Co-authored-by: R Midhun Suresh <hi@midhun.dev>
This commit is contained in:
co-authored by
R Midhun Suresh
parent
9640c330e5
commit
bdee36ca7c
@@ -272,6 +272,8 @@ Inheriting all the rules of TypeScript, the following additionally apply:
|
|||||||
18. Components should serve a single, or near-single, purpose.
|
18. Components should serve a single, or near-single, purpose.
|
||||||
19. Prefer to derive information from component properties rather than establish state.
|
19. Prefer to derive information from component properties rather than establish state.
|
||||||
20. Do not use `React.Component::forceUpdate`.
|
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)
|
## Stylesheets (\*.pcss = PostCSS + Plugins)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user