From 915590ea73ff881fdd31c2d6382a6619cd390141 Mon Sep 17 00:00:00 2001 From: mmalerba Date: Mon, 13 Aug 2018 09:51:03 -0700 Subject: [PATCH] fix(cdk-text-field): prevent keyframes from getting stripped by LibSass (#12567) --- src/cdk/text-field/_text-field.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;