mui / mui/material-ui

[joy-ui] `--joy-spacing` CSS var no longer injected

Open
#43,413 1 comment 0 reactions 1 assignee View on GitHub

@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:

  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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.