Closed bmakan closed 3 weeks ago
Same for shadows
The goal of Pigment is to remove calling theme at runtime. Can you share what's your use case for getting the theme at runtime?
The proper way is to use the generated CSS variables:
spacing is available as --mui-spacing
or theme.vars.spacing
shadow is avaiable as --mui-shadows-<number>
or theme.vars.shadows[number]
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.
Steps to reproduce
Link to live example: CodeSandbox
(Sandbox not working, but downloading the sandbox code and running it locally works. Not sure what's going on.)
Steps:
spacing
property in it.Current behavior
When using the theme from
import { useTheme } from "@mui/material-pigment-css";
, the theme object has nospacing
property. The property is present when using theimport { useTheme } from "@mui/material/styles";
.Expected behavior
The
theme
object should have aspacing
property.Context
No response
Your environment
``` System: OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish) Binaries: Node: 20.12.2 - /usr/bin/node npm: 10.5.0 - /usr/bin/npm pnpm: Not Found Browsers: Edge: Version 128.0.2739.79 (Official build) (64-bit) npmPackages: @emotion/react: 11.13.3 @emotion/styled: 11.13.0 @mui/core-downloads-tracker: 6.1.0 @mui/material: 6.1.0 => 6.1.0 @mui/material-pigment-css: 6.1.0 => 6.1.0 @mui/private-theming: 6.1.0 @mui/styled-engine: 6.1.0 @mui/system: 6.1.0 @mui/types: 7.2.16 @mui/utils: 6.1.0 @pigment-css/react: 0.0.22 => 0.0.22 @pigment-css/vite-plugin: 0.0.22 => 0.0.22 @types/react: ^18.2.65 => 18.3.7 react: ^18.2.0 => 18.3.1 react-dom: ^18.2.0 => 18.3.1 typescript: ^5.4.2 => 5.6.2 ```npx @mui/envinfo
Search keywords: pigmentcss theme spacing