Skip to content

Commit

Permalink
[GHI #22] Color, Utility, and Token Documentation (#148)
Browse files Browse the repository at this point in the history
This PR adds documentation for utilities, tokens, and colors. It also adds a missing utility for align self: baseline; called self-baseline
  • Loading branch information
Jeremy-Walton authored Mar 7, 2023
1 parent 9ddad0e commit ba9f87f
Show file tree
Hide file tree
Showing 60 changed files with 4,119 additions and 461 deletions.
22 changes: 22 additions & 0 deletions .storybook/documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,27 @@

.font-family-demo--alternative {
--rm-font-family: 'Tilt Neon', sans-serif;

font-family: var(--rm-font-family);
}

.design-token-container {
.design-token-card {
table {
td:nth-of-type(1),
th:nth-of-type(1) {
flex-basis: 40%;
}

td:nth-of-type(2),
th:nth-of-type(2) {
flex-basis: 35%;
}

td:nth-of-type(3),
th:nth-of-type(3) {
flex-basis: 25%;
}
}
}
}
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/preset-scss',
{ name: 'storybook-design-token', options: { preserveCSSVars: true } },
],
framework: '@storybook/html',
}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ There are also a few component specific tokens that are defined in their respect

There is a JSON file in `docs/token_structure.json` that lists all the current tokens in one place and shows how the names indicate organization.

### Token Documentation

We use the Storybook Design Token for showing design tokens in the documentation. This allows us to tag groups of tokens with a category and a presenter.

[Available Presenters](https://github.com/UX-and-I/storybook-design-token#available-presenters)

Add the following above a group to categorize the tokens.

```css
/**
* @tokens Basic Colors
* @presenter Color
*/
```

## License

[MIT](LICENSE)
Loading

0 comments on commit ba9f87f

Please sign in to comment.