Skip to content
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

fix: properly handle CSS animation on CSS Modules #6969

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

3c1u
Copy link
Contributor

@3c1u 3c1u commented Feb 21, 2023

Description:

In the current implementation of swc_css_modules, any first identifier in animation properties are transformed as the local identifier.

Current behaviour:

/* this */
.a {
  animation: 3s ease animationName;
}

/* will be transformed like this: */
.__local__a {
  animation: 3s __local__ease animationName;
}

Expected behaviour:

/* this */
.a {
  animation: 3s ease animationName;
}

/* should be transformed like this: */
.__local__a {
  animation: 3s ease __local__animationName;
}

This pull request will fix this.

FYI: https://developer.mozilla.org/en-US/docs/Web/CSS/animation

BREAKING CHANGE:

Related issue (if exists):

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!


swc-bump:

  • swc_css_modules

@kdy1 kdy1 merged commit 4771aa2 into swc-project:main Feb 21, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.36 Feb 21, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants