fix: use carbon prefix directly from @carbon/styles package config#8904
Open
makafsal wants to merge 70 commits intocarbon-design-system:mainfrom
Open
fix: use carbon prefix directly from @carbon/styles package config#8904makafsal wants to merge 70 commits intocarbon-design-system:mainfrom
makafsal wants to merge 70 commits intocarbon-design-system:mainfrom
Conversation
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8904 +/- ##
=======================================
Coverage 80.26% 80.26%
=======================================
Files 427 427
Lines 19523 19523
Branches 4253 4253
=======================================
Hits 15671 15671
Misses 3852 3852
🚀 New features to boost your workflow:
|
6 tasks
anamikaanu96
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7639
Our current approach of directly referencing
c4p-settings.$carbon-prefixcauses our library to not support custom prefixing with Carbon. If someone attempts to add custom prefixing with base Carbon, the custom prefix won't be applied to any of the Carbon components that we reference directly within our component styles.Instead, we should be accessing the carbon styles config module directly so that if the prefix is being passed a custom value, we're also using it.
What did you change?
Any sass file in our project that uses
c4p-settings.$carbon-prefixHow did you test and verify your work?
Manually added a custom Carbon prefix to our storybook


packages/ibm-products/.storybook/preview.jspackages/ibm-products/.storybook/index.scssPR Checklist
As the author of this PR, before marking ready for review, confirm you:
More details can be found in the pull request section of
our contributing docs.