MudRating with custom MaxValue and 'd-block' class causes extra width on mobile
#12.013 aperta il 28 ott 2025
Metriche repository
- Star
- (10.394 stelle)
- Metriche merge PR
- (Merge medio 6g 6h) (108 PR mergiate in 30 g)
Descrizione
Before reporting
- I searched existing issues
- I tried in private/incognito browser
What went wrong?
I had been stumped for a couple of days why the mobile version of the site needed a third more of the width than on any of the other pages. After a lot of trial and error it turned out to be the MudRating element which, although visually there is plenty of room left, required extra space when the MaxValue attribute is set to 10 despite being inside a MudPaper and MudContainer wrapper.
No issues when MaxValue is left to the default value. I've added a snippet which has a more exaggerated effect due to the structure of the playground on mobile.
[EDIT]: Just tested some more and it's the combination of using 'd-block' which I needed on larger screens together with the custom MaxValue that causes the behaviour.
Reproduction link
https://try.mudblazor.com/snippet/cEmfbaQizUYaywQb
Reproduction steps
- Add MudRating element
- Set MaxValue to 10
- Use devtools to emulate mobile device
Version (bug)
v8.11.0
Version (working)
No response
Environment
Edge
Blazor rendering mode
WASM