fix(cdk-text-field): prevent keyframes from getting stripped by LibSass (#12567)

This commit is contained in:
mmalerba
2018-08-13 09:51:03 -07:00
committed by GitHub
parent fceb7afa39
commit 915590ea73
+4 -3
View File
@@ -1,10 +1,11 @@
// Core styles that enable monitoring autofill state of text fields.
@mixin cdk-text-field {
// Keyframes that apply no styles, but allow us to monitor when an text field becomes autofilled
// by watching for the animation events that are fired when they start.
// by watching for the animation events that are fired when they start. Note: the /*!*/ comment is
// needed to prevent LibSass from stripping the keyframes out.
// Based on: https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
@keyframes cdk-text-field-autofill-start {}
@keyframes cdk-text-field-autofill-end {}
@keyframes cdk-text-field-autofill-start {/*!*/}
@keyframes cdk-text-field-autofill-end {/*!*/}
.cdk-text-field-autofill-monitored:-webkit-autofill {
animation-name: cdk-text-field-autofill-start;