Skip to content

Commit 4180e72

Browse files
committed
fix(cdk-text-field): prevent keyframes from getting stripped by LibSass (#12567)
1 parent f575b1f commit 4180e72

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/cdk/text-field/_text-field.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// Core styles that enable monitoring autofill state of text fields.
22
@mixin cdk-text-field {
33
// Keyframes that apply no styles, but allow us to monitor when an text field becomes autofilled
4-
// by watching for the animation events that are fired when they start.
4+
// by watching for the animation events that are fired when they start. Note: the /*!*/ comment is
5+
// needed to prevent LibSass from stripping the keyframes out.
56
// Based on: https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
6-
@keyframes cdk-text-field-autofill-start {}
7-
@keyframes cdk-text-field-autofill-end {}
7+
@keyframes cdk-text-field-autofill-start {/*!*/}
8+
@keyframes cdk-text-field-autofill-end {/*!*/}
89

910
.cdk-text-field-autofill-monitored:-webkit-autofill {
1011
animation-name: cdk-text-field-autofill-start;

0 commit comments

Comments
 (0)