Bug report
Not exactly a bug with stitches, but more of a limitation of css variables.
Describe the bug
Certain token keys create invalid css variables tokens. For example:
const theme = {
colors: {
test: "black", // ✅ works, of couse
"test-test": "black", // ✅ works
test_test: "black", // ✅ works
"test.test": "black", // ❌ breaks
"test/test": "black" // ❌ breaks
},
For cases which break, the CSS variables created look something like: var(--colors-test)/test
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Sandbox
- Check dev tools for divs with white backgrounds
Expected behavior
Support any string as a token key, or warn when an invalid one is used.
Screenshots
n/a. See Sandbox
System information
- OS: macOs
- Browser (if applies): n/a
- Version of Stitches: 0.1-canary.20
- Version of Node.js: 14
Additional context
This certainly might be won't fix issue. In my case I hoped to use this structure: test/test because our design tokens are also used in other places (Figma), and we hoped to keep them identical in code and design.
Bug report
Not exactly a bug with stitches, but more of a limitation of css variables.
Describe the bug
Certain token keys create invalid css variables tokens. For example:
For cases which break, the CSS variables created look something like:
var(--colors-test)/testTo Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
Support any string as a token key, or warn when an invalid one is used.
Screenshots
n/a. See Sandbox
System information
Additional context
This certainly might be won't fix issue. In my case I hoped to use this structure:
test/testbecause our design tokens are also used in other places (Figma), and we hoped to keep them identical in code and design.