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

Represent alternate versions of CSS Custom Properties from Sass #4426

Closed
joshblack opened this issue Oct 22, 2019 · 2 comments
Closed

Represent alternate versions of CSS Custom Properties from Sass #4426

joshblack opened this issue Oct 22, 2019 · 2 comments

Comments

@joshblack
Copy link
Contributor

We're running into a couple of situations where our current CSS Custom property approach (behind the feature flag) is falling short, namely when the values of a token need to either switch to a different representation (rgba) or are programmatically altered (lighten/darken).

As a result, we run into the following situation:

$token-01: var(--token-01, #343434);

.my-selector {
  color: rgba($token-01, 0.5);
  // Expands to
  color: rgba(var(--token-01, #343434), 0.5)
}

In this case, rgba expects an rgb list and is receiving a hex value.

In addition, there are moments where we might want to lighten/darken a value programmatically.

$token-01: var(--token-01, #343434);

.my-selector {
  // Does not work since `$token-01` is not a CSS Custom Property
  color: lighten($token-01, 0.25);
}
@emyarod
Copy link
Member

emyarod commented Oct 23, 2019

would this be related to #4345 as well?

@joshblack
Copy link
Contributor Author

This will be addressed when we switch to using CSS Custom Properties directly in a future release!

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

3 participants