-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Regression: CSS runtime variable theming for tabs is broken #4686
Comments
#4688 will fix this to some extent. But as per the current state most of the components we do not support theming using only CSS variables because of CSS limitations. For example, we use But, support for CSS variables for theming is something that is in our radar. |
Pointing out something that was previously supported / working that now isn't, which is a breaking change for people that rely on it. I've had a ton of success using only css variables. This old PR I had open was more for brainstorming, but the idea this guy posted would solve the color mixin problem and allow css vars to work everywhere. #3145 (comment) |
So far we've included sass variable / mixin changes & component API changes as breaking changes. Since we don't fully support theming using CSS variable we haven't consider this as breaking change. Another alternative approach to support CSS variables is to generate CSS variables for each primary color variant (ranging from 100 to 800) and reference it in the places where we need to mix with alpha. For example, primary color with alpha .34: |
Did you see the comment above? You can specify the colors and comma separated rgb for the variables which would allow you to do it all dynamically. |
I did take a look at the issue that you linked last year. Now I remember that I made a working prototype with that approach as proof-of-concept. /theme_alpha_variables_issue3066 :) At that time, we decided not to change the color value format just to support this feature. |
Oh awesome. Well, personally I feel that css vars are freaking amazing (and I'll never run SASS again). I'd love to see the library move into a direction of official support for them, and as always, willing to help get it there. I've been using them exlusively for 2 years with little to no issues, just minor things like this that pop up. |
I created epic bug to track all the things related to CSS variables: #4709 |
Awesome, thanks :) |
I think I've tracked it down to this line which no longer respects css variables, only the SASS.
https://github.com/material-components/material-components-web/pull/4675/files#diff-bebfa5920069adc8cf8c7d36390da5f6R130
The text was updated successfully, but these errors were encountered: