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

Consider removing either mdc-elevation-transition or mdc-elevation-transition-rule #1724

Closed
kfranqueiro opened this issue Dec 7, 2017 · 1 comment
Assignees

Comments

@kfranqueiro
Copy link
Contributor

We currently have a function and a mixin that do nearly the same thing:

Currently we use the latter in 3 or so places ourselves, and only use the former within the latter.

However, the automatic/forced inclusion of will-change: box-shadow contributed to bug #1665, which makes me wonder if including it by default might not be the best idea. Either way, we do expose a CSS class which applies both transition and will-change, and we could keep that unchanged. So my vote would be to remove mdc-elevation-transition and keep ...-rule.

Another option would be to nix the function and remove will-change from the mixin, thus making the mixin equivalent to what the function currently does, but emitting the style for you.

Either way, I'm not sure there's a reason for both of these things to exist when they're so similar.

@kfranqueiro
Copy link
Contributor Author

Another argument for favoring the -rule function over the mixin is it enables you to combine the value it returns with other transition properties within a single rule. (h/t ErraticFox on discord for bringing up this use case.)

I'm going to go about removing the mixin and using the -rule function everywhere, so that I can safely move the ripple will-change property back to the surface and off of the pseudo-elements (which will resolve #1753 and #1854 without regressing #1665).

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

2 participants