Skip to content

Expose scss variables to be available in JS #2575

@coderitual

Description

@coderitual

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions