Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Design tokens as css variables #267

Open
nathanyoung opened this issue Dec 18, 2019 · 2 comments
Open

Design tokens as css variables #267

nathanyoung opened this issue Dec 18, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@nathanyoung
Copy link
Contributor

nathanyoung commented Dec 18, 2019

Currently the only way to consume pebble design tokens is to include the _variables.scss file in another scss file. We should output the tokens as css vars so they can be used by consumers in their own stylesheets or inline css, without having to import scss in the node_modules folder.

https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

@nathanyoung nathanyoung added the enhancement New feature or request label Dec 18, 2019
@nathanyoung
Copy link
Contributor Author

Here's an example of what has to be done by a consumer app

@import "../../../../node_modules/@istreamplanet/pebble/dist/Styles/foundation/_color.scss";

.blue-bg-example {
    background-color: $blue-lighter;
}

Would like this to be

.blue-bg-example {
    background-color: var(--blue-lighter);
}

@osbornm osbornm added this to the v3.x.x milestone Mar 26, 2021
@eddiemonge
Copy link
Member

This can be considered a breaking change as supporting both is not desired so it would be entirely variable based

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants