#4870·MudBlazor

Margin & padding utility classes should be re-ordered from least to most specific

Author: Conman-123Created Jul 12, 2022Updated Sep 27, 2026
Labelsenhancementbreaking change

Bug type

Other

Component name

No response

What happened?

In the MudBlazor.css file the margin and utility classes are ordered from most to least specific (e.g. pb-1 comes before pa-1). They should be re-ordered to least to most specific, so that the more specific classes can override the less specific classes.

E.g. I have a div, I want padding 5 on all sides except the bottom, which should be padding 1. If I use pa-5 pb-1, the pb-1 is overridden because it comes before pa-5 in the stylesheet.

Expected behavior

More specific margin and padding classes should be defined after less specific classes so they can override them.

Reproduction link

https://try.mudblazor.com/snippet/wYmwuVPmOoXcwDPY

Reproduction steps

N/A

Relevant log output

No response

Version (bug)

6.0.11

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct