-
Notifications
You must be signed in to change notification settings - Fork 189
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
@keyframes :global()
selector not properly handled in CSS modules - Unexpected token Colon
#863
Comments
Duplicate of #825. This syntax is not supported. |
Okay - I really like the idea of What about using global keyframes? postcss supports the following syntax: animation: global(animation-name); postcss allows mixing it with non global animation names in the same declaration |
The "referencing an identifier" section of the proposal has a more general way to do that which would allow importing names from other files in addition to the global namespace. |
okay so instead of animation: global(animation-name); you would prefer animation: import(animation-name from global); do you think we could already implement |
Not sure. It was just a proposal. I was hoping to get consensus between implementations. Sounds like postcss implemented |
That's correct - it was added last month Right now it's not possible in postcss to import an identifier from another file so the only solution is defining it global either in a non css module or using @keyframes :global(fade-in) {
} once defined it can be consume with animation: global(animation-name);
and |
When using the
:global()
selector with@keyframes
the animation name cannot be parsed and LightningCSS throws a syntax errorUnexpected token Colon
Example CSS
Current Behavior
Unexpected token Colon
Expected Behavior
Same result as PostCSS (Stackblitz Demo):
The text was updated successfully, but these errors were encountered: