You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[system] Negative spacing produces invalid CSS for calc() and clamp() values in a spacing array #49897
scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIstatus: waiting for maintainerThese issues haven't been looked at yet by a maintainer.
A - in front of a CSS function is not valid CSS, so the browser drops the declaration and the negative margin is not applied.
Expected behavior
calc(-1 * clamp(0.5rem, 1vw, 1rem)) and calc(-1 * calc(1rem + 2px)), the same way a var() value is already negated.
Context
For a spacing array and a negative value, createBaseUnit in packages/mui-system/src/spacing/spacing.ts returns -${value} for strings. #45550 added calc(-1 * …) for values that start with var(, but other CSS functions (calc(), clamp(), min(), max()), which are common in fluid spacing scales, still get the - prefix.
scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIstatus: waiting for maintainerThese issues haven't been looked at yet by a maintainer.
Activity