MudBlazor/MudBlazor

MudRating with custom MaxValue and 'd-block' class causes extra width on mobile

Aperta

#12.013 aperta il 28 ott 2025

 (0 commenti) (0 reazioni) (0 assegnatari)C# (1631 fork)batch import
bugdevice: mobilegood first issue

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

  1. Add MudRating element
  2. Set MaxValue to 10
  3. Use devtools to emulate mobile device

Version (bug)

v8.11.0

Version (working)

No response

Environment

Edge

Blazor rendering mode

WASM

Guida contributor