Skip to content

Allow emmet CSS shorthands in the sx prop #29734

@Zenoo

Description

@Zenoo

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

The sx prop already allows us to use m, my, mx, mt, mb, ml, mr, p, py, px, pt, pb, pl, pr as shorthands for margin and padding.

Being able to use other emmet CSS shorthands would be great.

Examples 🌈

<Box sx={{ d: 'inline' c: 'red', pos: 'fixed', fz: 12  }}>

Would be similar to:

<Box sx={{
  didplay: 'inline'
  color: 'red',
  position: 'fixed',
  fontSize: 12
}}>

Motivation 🔦

I've been using emmet since I started coding, seeing the same kind of feature for margin of padding in MUI reminded me of how time saving it is, and could be here too if it's implemented.

I'd be happy to provide a PR for this if someone guides me to where the modifications should be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: new featureExpand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions