Skip to content

Replace @import with @use for theme styles#2941

Closed
prashant2007-wq wants to merge 1 commit intoprimer:mainfrom
prashant2007-wq:prashant2007-wq-patch-1
Closed

Replace @import with @use for theme styles#2941
prashant2007-wq wants to merge 1 commit intoprimer:mainfrom
prashant2007-wq:prashant2007-wq-patch-1

Conversation

@prashant2007-wq
Copy link

Description

Fixes #2781

This PR addresses the Sass deprecation warnings by migrating from @import to @use in the color-modes module.

Changes

  • Replaced all @import statements with @use in src/color-modes/index.scss
  • This removes Sass deprecation warnings for @import directives
  • Follows the modern Sass module system best practices

Related Issue

Closes #2781

Testing

  • Verified that the styles compile without deprecation warnings
  • Confirmed that the color modes still work as expected

This commit addresses issue primer#2781 by migrating from deprecated @import statements to the modern @use directive in color-modes/index.scss.

Changes:
- Replaced all @import statements with @use
- This removes Sass deprecation warnings
- Follows Sass module system best practices
@prashant2007-wq prashant2007-wq requested a review from a team as a code owner December 9, 2025 12:29
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: 36222f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lesliecdubs lesliecdubs requested review from a team and pksjce December 9, 2025 18:12
@lesliecdubs lesliecdubs removed the request for review from pksjce December 16, 2025 21:07
@francinelucca
Copy link
Member

Thanks for the PR @prashant2007-wq , we've attempted this approach before but determined this migration will need more in-depth work to be compatible with our internal systems, so closing the PR and leaving the issue open for now

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@import and global built-in functions are deprecated in Sass

2 participants