[joy-ui] `--joy-spacing` CSS var no longer injected
Open
@siriwatknp is already working on this.
Since Aug 23, 2024.
customization: theme
on hold
package: joy-ui
scope: all components
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
Link to live example (Any of the Joy UI Codesandbox):
https://codesandbox.io/s/pt8svk?file=/src/Demo.tsx
Steps:
- Update to latest version of
@mui/joy --joy-spacingCSS var is no longer injected into styles
Current behavior
--joy-spacing CSS var is not injected into styles
Expected behavior
--joy-spacing CSS var is injected into styles
Context
I used var(--joy-spacing) in quite a few of my custom styles rather than theme -> theme.spacing(x) to minimize JS and it worked nicely.
Your environment
npx @mui/envinfo
System:
OS: macOS 14.6.1
Binaries:
Node: 21.6.0 - /usr/local/bin/node
npm: 10.2.4 - /usr/local/bin/npm
pnpm: 9.6.0 - /usr/local/bin/pnpm
Browsers:
Chrome: 128.0.6613.84
Edge: 128.0.2739.42
Safari: 17.6
Search keywords: joy, spacing, theme
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.