[material-ui][Badge] Use inline CSS variables for anchorOrigin/overlap positioning by siriwatknp · Pull Request #48549 · mui/material-ui (original) (raw)

Follow-up to #47742.

Instead of computing positioning via a style: ({ ownerState }) => {...} callback in the styled variants array, this PR:

Why

Variables

Three CSS variables drive positioning, leveraging existing CSS shorthand:

Follows the same "inline-style sets a --ComponentName-* variable, styled CSS consumes it" pattern already used by:

Behavior

No visible change. Same eight outcomes (top/bottom × left/right × rectangular/circular) produce the same CSS output as before #47742.