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

[Bug]: config prefix hardcoded to 'cds' in zone.scss for background and color properties #14827

Closed
2 tasks done
JakeMetz8 opened this issue Oct 9, 2023 · 2 comments · Fixed by #14828
Closed
2 tasks done
Assignees
Labels
role: dev 🤖 severity: 2 https://ibm.biz/carbon-severity type: bug 🐛
Milestone

Comments

@JakeMetz8
Copy link

Package

@carbon/styles

Browser

No response

Package version

11.33.0

React version

No response

Description

Lines 39 and 40 set the background and color properties scoped to given zone class. However, they are hardcoded with the cds prefix rather than dynamically using the prefix from config. This break when a user of your system sets a different prefix.

    39: background: var(--cds-background);
    40: color: var(--cds-text-primary);

suggested:

background: var(--#{config.$prefix}-background);
color: var(--#{config.$prefix}-text-primary);

Reproduction/example

https://github.com/carbon-design-system/carbon/blob/release/v11.33.0/packages/styles/scss/_zone.scss

Steps to reproduce

Set the prefix to something other than cds. Check zoned styles to see if background and color are broken

Suggested Severity

None

Application/PAL

No response

Code of Conduct

@tay1orjones
Copy link
Member

@JakeMetz8 Thanks for reporting this, I've got a PR up to fix

@JakeMetz8
Copy link
Author

@tay1orjones thank you so much. Once I get a bit more confident I'll try to raise PRs for these easy ones ;)

@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Design System Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: dev 🤖 severity: 2 https://ibm.biz/carbon-severity type: bug 🐛
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants