diff --git a/src/cdk/text-field/_text-field.scss b/src/cdk/text-field/_text-field.scss index 82ecffcf480..46a79b6d318 100644 --- a/src/cdk/text-field/_text-field.scss +++ b/src/cdk/text-field/_text-field.scss @@ -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;