Capgemini / dcx-react-library

React Library UI/UX agnostic
https://main--6069a6f47f4b9f002171f8e1.chromatic.com
MIT License
107 stars 7 forks source link

Design base css needs to use token #560

Closed alexwbbr closed 7 months ago

alexwbbr commented 8 months ago

The design systems base css is currently using a hard coded value for the font family instead of the token "font-family-body" this needs to be updated to allow users to set the base font family for the entire website.

cg-mmirca commented 8 months ago

Hi @alexwbbr,

Thank you for reaching out. The font styles should still be customisable with the current version of the library.

I created a test project to showcase this feature:

Screenshot 2023-10-24 at 17 40 11

You would need to update the global styles to provide your own custom font definition for the html element.

alexwbbr commented 8 months ago

@cg-mmirca thanks for the reply!

Whilst you can overwrite the global value what is the point of having a global-font token if it's not used in the html or body tag? How often is a website using two different font's for the main body and it's buttons or paragraphs for example. I still think the hard coded value should be replaced with the token otherwise what point is there in the tokens if people just overwrite the classes directly?

daniele-zurico commented 7 months ago

closed as not needed for now