Repository navigation
[Layout] Remove unnecessary mobile layout styles - #5391
Merged
Denis Voituron (dvoituron) merged 2 commits intoOct 5, 2026
Merged
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
October 5, 2026 10:13
Denis Voituron (dvoituron)
enabled auto-merge (squash)
October 5, 2026 10:14
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The removed overrides are no longer needed, and removing them restores user-configured padding on mobile.
Review effort: Balanced
Findings: None
What changed in this PR
Removes an obsolete mobile content override from FluentLayout, preserving user-configured padding without changing the current grid layout.
Changes:
- Removes the forced mobile right-padding reset.
- Removes the redundant mobile content grid-area override.
| File | Description |
|---|---|
| src/Core/Components/Layout/FluentLayoutItem.razor.css | Removes obsolete mobile content styles. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.3%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
Vincent Baaij (vnbaaij)
approved these changes
Oct 5, 2026
Denis Voituron (dvoituron)
deleted the
users/dvoituron/fix-layout-right-padding
branch
October 5, 2026 10:33
This was referenced Oct 14, 2026
Closed
Closed
Merged
This was referenced Oct 19, 2026
Closed
Closed
This was referenced Oct 28, 2026
Merged
Closed
This was referenced Nov 9, 2026
This was referenced Nov 19, 2026
Merged
Closed
This was referenced Nov 27, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Layout] Remove unnecessary mobile layout styles
Eliminate redundant mobile layout styles for the content area to streamline the CSS and improve maintainability.
This rule was introduced with the original
FluentLayoutimplementation in #2498 to support a stickyAside.At that time, the
Contentarea could extend into theAsidegrid column, and the component dynamically added apadding-rightequal to the width of the stickyAside. On mobile, theAsidewas hidden, so this CSS rule restored the content to its normal grid area and removed the extra padding:The layout implementation was later changed in #3743. The
Contentarea no longer extends into theAsidecolumn, and the component no longer adds a compensatingpadding-right. The mobile override therefore no longer has any library-generated style to reset.Keeping the rule now causes incorrect behavior: because
padding-right: unsetis marked as!importantand uses a highly specific selector, it overrides padding explicitly configured by the user, includingPadding="@Padding.All3", spacing utility classes, and inlinepaddingstyles. As a result, the content loses only its right padding when the layout switches to mobile mode.The
grid-areaoverride is also redundant because the component already renders the content withgrid-area: content, and the mobile grid explicitly defines thecontentarea.Therefore, the correct solution is to remove the entire rule. It is a leftover from the original layout implementation and no longer serves a functional purpose; removing it restores the user-configured padding without affecting the current desktop or mobile layout behavior.
This change does not introduce any breaking changes.