Skip to content

[joy-ui] --joy-spacing CSS var no longer injected #43413

@Onurfesci

Description

@Onurfesci

Steps to reproduce

Link to live example (Any of the Joy UI Codesandbox):
https://codesandbox.io/s/pt8svk?file=/src/Demo.tsx

Steps:

  1. Update to latest version of @mui/joy
  2. --joy-spacing CSS 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
I used Chrome.

Search keywords: joy, spacing, theme

Metadata

Metadata

Assignees

Labels

customization: themeHigher level theming customizability.on holdThere is a blocker, we need to wait.package: joy-uiSpecific to Joy UI.scope: all componentsWidespread work has an impact on almost all components.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions