CouncilDataProject / CouncilDataProject/cdp-design

Export at least the color tokens so that they can be use in javascript too

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Feature Description

Allow cdp-frontend to use the color tokens in javascript

### Use Case

Most of the non-Mozilla protocol styling in cdp-frontend use CSS-in-JS (https://github.com/emotion-js/emotion) or inline styling. It would add some versatility to cdp-design if other libraries could use the color tokens in javascript too. For example, I couldn't use the dark blue color in the [jump-to-sentence-cue PR](https://github.com/CouncilDataProject/cdp-frontend/pull/144) because there isn't generated CSS class for `border-color`. We could add more CSS classes but that seems tedious to me. We would have to create a class for each CSS color property (border-left-color, border-right-color, outline-color, etc)?

### Solution

Export the colors tokens to dist/colors.js (It seems the file is already generated, but it's empty).

### Alternatives

More CSS classes for other color properties.

cc @JacksonMaxfield

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.