You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to define a prefix for tokens that are built into css and scss files? Particularly for css and scss files the tokens get applied to the page globally so I would like to use a custom prefix with them.
For example instead of:
:root {
--black:#000000;
}
I'd like to be able to set the prefix my-prefix and have the following:
:root {
--my-prefix-black:#000000;
}
I'd also like to conditionally use the prefix. For example, the prefix isn't needed for JS files
The text was updated successfully, but these errors were encountered:
# Pull Request
## 🤨 Rationale
This PR addresses the second half of #236 (comment) by adding the prefix `nimble-base` to the raw tokens defined in ni/tokens.
## 👩💻 Implementation
- Modified the nimble-extensions for the Adobe DSP to add a prefix to the names. Used a workaround as I couldn't see a way to configure a prefix using the DSP itself. I created the following issue for the workaround: AdobeXD/design-system-package-dsp#27
- Only defined the prefix for css and scss files. The rationale being that those are set globally in a page and can conflict. The JS files are modules that are explicitly imported and not globally available so are unlikely to get used accidentally.
## 🧪 Testing
Just CI builds, no explicit testing.
## ✅ Checklist
- [x] I have updated the project documentation to reflect my changes or determined no changes are needed. Doc changes will be aligned with #231 or after. Won't address in this PR.
Is there a way to define a prefix for tokens that are built into css and scss files? Particularly for css and scss files the tokens get applied to the page globally so I would like to use a custom prefix with them.
For example instead of:
I'd like to be able to set the prefix
my-prefix
and have the following:I'd also like to conditionally use the prefix. For example, the prefix isn't needed for JS files
The text was updated successfully, but these errors were encountered: