Inputs: Fixed margins on each variant and margin sizes#9517
Inputs: Fixed margins on each variant and margin sizes#9517henon merged 7 commits intoMudBlazor:devfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9517 +/- ##
==========================================
+ Coverage 89.82% 90.52% +0.69%
==========================================
Files 412 407 -5
Lines 11878 12729 +851
Branches 2364 2466 +102
==========================================
+ Hits 10670 11523 +853
+ Misses 681 643 -38
- Partials 527 563 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
danielchalmers
left a comment
There was a problem hiding this comment.
LGTM just a concern about backwards compatibility
Ready, just added a question about the mud-input-input-control |
danielchalmers
left a comment
There was a problem hiding this comment.
Awesome, thanks for being willing to keep iterating on this
|
Are we sure this will not be viewed as a layout-breaking change? Edit: Yes, it fixes a regression reported via #9497, sorry didn't see it at first. |
|
Hi, the changes in _inputcontrol.scss break our layout. Now there are margins to the left and right of MudTextInput. Was this intended? |
cc @ralvarezing |
|
@haas-daniel Yes, the two Dense and Normal margin sizes do have some left and right margins which can be removed adding Class="mx-0". As if this was intended, yes |
@ralvarezing Please state your reasons for adding the margin, thanks. I suspect you had good ones. |
In my case is just because the Margin parameter seems to be a little inconsistent only affecting the vertical margins and not the horizontal margins. But this is probably something that is subjective so will be interesting to see different opinions. @haas-daniel, what are your thoughts? Edit: In both cases, like it it now or was before, if you want or don't want horizontal margins, will be required to add Class="mx-0" or Class="mx-X". Unless you're using MudGrid and Spacing |
|
IMHO the left and right margins should not be changed because it breaks the layout. Otherwise, it should at least be documented. (The documentation for MudTextField says "With the Margin property you can reduce the text field height.") I "fixed" it in our project by defining css classes that override those from MudBlazor: |
@haas-daniel that's a great point, and something I wasn't aware to be honest. |
@danielchalmers What do you advise? |
|
I would change it back to not affect left and right margins because it's expected behavior and this popular library does it like that as well |
|
Great! there I opened a pr to revert those margins: #9652 |
Description
Fix to the margin bug when using dense variant.
Margins are adjusted so when a label is set, this margin is enough to prevent other components to overlap the label.
Dense margins variant


None margins variant


Normal margins variant

fixes #9497
How Has This Been Tested?
Type of Changes
Checklist
dev).