Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

design: spacing as multiple of 16 #31

Closed
crotru opened this issue Dec 28, 2020 · 2 comments
Closed

design: spacing as multiple of 16 #31

crotru opened this issue Dec 28, 2020 · 2 comments
Assignees
Labels
CSS 🎨 Related to CSS styles packages

Comments

@crotru
Copy link
Contributor

crotru commented Dec 28, 2020

Could spacing values be some multiples of 16 (as it is for other design tokens ?)
it allows easily match to integer values.

Here we have multiple of 0.25, this gives us half pixels :

image

(0.25rem -> 2.5px)

@lauthieb lauthieb changed the title Design evolution: spacing as multiple of 16 design: spacing as multiple of 16 Dec 28, 2020
@lauthieb lauthieb added design request 🙌 CSS 🎨 Related to CSS styles packages labels Dec 28, 2020
@lauthieb lauthieb self-assigned this Dec 28, 2020
@lauthieb
Copy link
Member

lauthieb commented Dec 28, 2020

Hi @crotru!
Thanks for reporting this issue.

FYI, we follow this guideline: https://www.decathlon.design/726f8c765/p/061870-layout/t/98b2d9

Capture d’écran 2020-12-28 à 21 28 13

In most browsers, 1rem = 16px, so I feel disagree with your "0.25rem => 2.5px".
Cf. this table: https://gist.github.com/trevorgreenleaf/0aef4a3c33cdc8011affb170cef4384c

So, in my opinion, 0.25rem => 16px * 0.25 = 4px.
I don't see any font-size: 62.5%; inside our packages/css/lib/index.css generated.
Maybe, I'm wrong. What do you think please?

@crotru
Copy link
Contributor Author

crotru commented Dec 30, 2020

You're right @lauthieb,
I was indeed assuming the 62.5 trick was implemented,
but it's not really needed inside a design-system project since values are not subject to be easily changed by devs 🙂

I close the issue

@crotru crotru closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS 🎨 Related to CSS styles packages
Projects
None yet
Development

No branches or pull requests

2 participants