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

Sass variables referencing CSS variables #834

Closed
BSFishy opened this issue Jun 20, 2023 · 1 comment
Closed

Sass variables referencing CSS variables #834

BSFishy opened this issue Jun 20, 2023 · 1 comment

Comments

@BSFishy
Copy link
Contributor

BSFishy commented Jun 20, 2023

This is an issue to document a discussion that the OUI team had about moving over to Sass variables.

When #814 was raised, I made a comment (https://github.com/opensearch-project/oui/pull/814/files#r1234380915). Essentially, my idea was for existing Sass variables to be set to CSS variables (i.e. $ouiFontFamily would resolve to var(--oui-font-family)), then introduce another variable for themes to override.

I created a POC here: BSFishy@595ebbd

This would be nice, as the point of switching to CSS variables means these values can be changed on the front end without needing to rebuild the entire library. It would mean anywhere that these variables are used would also be using CSS variables, so we wouldn't need to manually go in and change those Sass variables to CSS variables.

Essentially, we can't go this route because it would be a breaking change. Existing code expects these Sass variables to be a certain value, for example a color. If they suddenly aren't a color, the code would break.

Again, just to document the discussion we had. No action items are associated with this issue.

@joshuarrrr
Copy link
Member

Thanks Matt!

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

No branches or pull requests

2 participants