material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.11k stars 2.15k forks source link

Tone should work with css-variables #8167

Open worthy7 opened 6 months ago

worthy7 commented 6 months ago

https://github.com/material-components/material-components-web/blame/8656bf0e032270f97d8673d33aaab4760befb5bc/packages/mdc-theme/_theme-color.scss#L66

Is this really neccessary? Why can it not work with css variables too? What happens if var(--my-primary-color) is passed in instead?

Can this code detect if it is a var and just resolve it and continue?