-
Notifications
You must be signed in to change notification settings - Fork 2.1k
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[mdc-floating-label] shake-keyframes generates invalid CSS #7423
Labels
Comments
Hi there, can you provide some repro steps and error messages to further investigate? |
brandondiamond
added
the
needs-response
Issues that need a response from the reporter
label
Oct 29, 2021
Looping in Liz who has some context on this after chatting during a triage meeting. |
This could be solved by changing the expression to This might be a bit moot with upcoming changes to text field to use web animations. |
asyncLiz
added
help wanted
and removed
needs-response
Issues that need a response from the reporter
labels
Nov 2, 2021
copybara-service bot
pushed a commit
that referenced
this issue
Nov 17, 2021
Fixes #7423. PiperOrigin-RevId: 410558072
copybara-service bot
pushed a commit
that referenced
this issue
Nov 19, 2021
Fixes #7423. PiperOrigin-RevId: 410558072
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Twice within
shake-keyframes
(here and here), the calc expressioncalc(0 - #{$positionX})
is used. The default value for$positionX
is0%
, so if no alternate value is passed, this generatescalc(0 - 0%)
, which is invalid CSS, causing the property it's in to be ignored.Actual behavior
The
transform
property assigned here will be ignored, since it contains an invalidcalc
expression.Expected behavior
The
calc
expression should be valid, allowing thetransform
property to be set as expected.Additional context
I discovered this in a somewhat odd edge case of someone trying to re-compile the already compiled
mdc-floating-label.scss
(which mean Sass's calc simplification threw an error), but the bug is present in all cases.Possible solution
Numbers with and without units should not be mixed within a
calc
expression. You may also wish to remove the interpolation, which would mean that Sass's calc simplification would catch this sort of bug early.The text was updated successfully, but these errors were encountered: