Material-components-web: Turn off all fallbacks for CSS vars by one option?

Created on 6 Sep 2019  路  2Comments  路  Source: material-components/material-components-web

Is it possible to disable all fallbacks for using CSS variables. These precautions generate a lot of extra and redundant code.

My projects are focused on modern browsers that 100% support CSS variables and all fallbacks are an extra ballast.

It would be nice to have some option-flag, to controll this feature, something like:

// some-mdc-theme-core-file.scss
$css-vars-fallback: true !default;

// and I can change it if wanted in my-project-core-file.scss
$css-vars-fallback: false

Tiny example (my problem and expectation):

01

backlog feature-request

Most helpful comment

This is a reasonable feature request. I'm not sure about the CSS var's fallback value but we can provide make the hardcoded color values optional with a boolean flag.

All 2 comments

This is a reasonable feature request. I'm not sure about the CSS var's fallback value but we can provide make the hardcoded color values optional with a boolean flag.

Thanks, that would be nice.
Could you tell when these changes can be expected?

Was this page helpful?
0 / 5 - 0 ratings