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

Expose scss variables to be available in JS #2575

Open
coderitual opened this issue Nov 9, 2022 · 0 comments
Open

Expose scss variables to be available in JS #2575

coderitual opened this issue Nov 9, 2022 · 0 comments

Comments

@coderitual
Copy link
Contributor

coderitual commented Nov 9, 2022

It would be helpful to use style guide tokens in JS env in places where SCSS/CSS is not available.

Example use cases:

  • styling external component integrated on JS level (all sorts of payments forms etc.)
  • screen size variable used in isSmall hook

The best would be to integrate it somehow in SG build so we don't need to define the values separately for SCSS and JS. We may use :export block in SCSS so JS preprocessor can import that file which all variables transformed to JS. This is not obligatory for the initial implementation though (but maintenance would suffer in long term)

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

No branches or pull requests

1 participant