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

Make whitespace invalid in token names #216

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChucKN0risK
Copy link
Contributor

@ChucKN0risK ChucKN0risK commented Apr 19, 2023

We've decided to consider a token as invalid when its name includes whitespaces.

  1. I've added a mention of this in the design-token.md file
  2. I've transformed to kebabcase all token names used in the spec in all pages to make them respect this new decision

@ChucKN0risK ChucKN0risK linked an issue Apr 19, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Apr 19, 2023

Deploy Preview for dtcg-tr ready!

Name Link
🔨 Latest commit 1b494d4
🔍 Latest deploy log https://app.netlify.com/sites/dtcg-tr/deploys/643fb09d143c160008830366
😎 Deploy Preview https://deploy-preview-216--dtcg-tr.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ChucKN0risK ChucKN0risK changed the title Make whitesapce invalid in token names Make whitespace invalid in token names Apr 19, 2023
@romainmenke
Copy link
Contributor

This is a major reversal of past choices.
Can you link to any notes/logs where this was discussed?

"$value": 33,
"$type": "number"
},
"Token cuatro": {
"Token-cuatro": {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Token-cuatro": {
"token-cuatro": {

@@ -17,6 +17,8 @@ Note: The `$type` property has been added to ensure this example is valid. Pleas

</aside>

The name of your design token must not include any whitespace. Otherwise your design token is considered as invalid.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The name of your design token must not include any whitespace. Otherwise your design token is considered as invalid.
Design tokens are written in kebab-case. Otherwise your design token is considered as invalid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be left as is. Kebab-case is only one way of avoiding whitespace... snake_case or CamelCase are fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leading/trailing white space in token names.
4 participants