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

Use css variables with sass mixins, rgba (opacity), and tint CSS functions #12

Open
christinach opened this issue Dec 1, 2023 · 1 comment

Comments

@sdellis
Copy link
Member

sdellis commented Mar 27, 2024

This is now possible for to applying opacity (rgba) and tinting of css variables using the color-mix syntax.
This solves the issue for rgba and tint values as we can replicate the output values as with color-mix, passing in transparent and white as mix colors.

Note: color-mix does not solve the issue for sass mixins.

body {
   --color: #DF00A9;
   background: color-mix(in srgb, var(--color) 70%, transparent);
}

See:

@sdellis sdellis changed the title Use css variables with sass mixins Use css variables with sass mixins, rgba (opacity), and tint CSS functions Mar 27, 2024
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