brainly / brainly/style-guide

Expose scss variables to be available in JS

Open
#2,575 0 comments 0 reactions 0 assignees View on GitHub
Type: Enhancement
Dominant language
TypeScript
Stars
165
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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)

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.