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

upgrades postcss-modules-local-by-default to v4.1.0 to support using global animation names #72622

Open
wants to merge 3 commits into
base: canary
Choose a base branch
from

Conversation

jantimon
Copy link
Contributor

@jantimon jantimon commented Nov 12, 2024

Currently, there's no clean way to reference global animation names in CSS Modules. This causes friction when:

  • Using animation libraries (like Animate.css)
  • Working with design systems that define animations globally

The new postcss-modules-local-by-default version 4.1.0 adds a clean syntax:

.component {
  animation: global(fadeIn) 0.5s ease-in;
  animation-name: global(fadeIn);
}

For more information see css-modules/postcss-modules-local-by-default#75

How?

  • Updates postcss-modules-local-by-default from 4.0.4 to 4.1.0
  • The new version adds support for global() function specifically for animation names
  • Only affects animation name localization, leaving other properties untouched

Testing

The functionality is tested in the postcss-modules-local-by-default package: https://github.com/css-modules/postcss-modules-local-by-default/blob/39a2f78d9f39f5c0e30dd9b2a25f4a145431cb20/test/index.test.js#L187-L243

@ijjk
Copy link
Member

ijjk commented Nov 12, 2024

Allow CI Workflow Run

  • approve CI run for commit: 7a44916

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link

socket-security bot commented Nov 12, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/[email protected]

View full report↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants