Skip to content

[dev-v5][MessageBar] Remove not working CSS rule#4756

Merged
vnbaaij merged 1 commit intomicrosoft:dev-v5from
MarvinKlein1508:remove-css
Apr 24, 2026
Merged

[dev-v5][MessageBar] Remove not working CSS rule#4756
vnbaaij merged 1 commit intomicrosoft:dev-v5from
MarvinKlein1508:remove-css

Conversation

@MarvinKlein1508
Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

This removes a small potion of CSS from FluentMessageBar which is not working. it was supposed to grow the message .content from the hardcoded 520px to max block size but this rule will always be ignored. So I removed it to shrink down the file size a bit.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

@vnbaaij vnbaaij merged commit eaf33b9 into microsoft:dev-v5 Apr 24, 2026
3 checks passed
@MarvinKlein1508 MarvinKlein1508 deleted the remove-css branch April 24, 2026 08:24
@dvoituron
Copy link
Copy Markdown
Collaborator

The purpose of this code was to prevent this outcome, namely that a max-width: 520px property be included in the web component.
image

The problem is that the web component hasn't defined the “content” section with a part=“content” attribute. Therefore, it's not possible to apply CSS styles to it.

Two solutions:

  1. Submit a request or a PR to the web component's fluentui repository
  2. Write some JavaScript to apply this change programmatically: $0.shadowRoot.querySelector('.content').style.maxWidth = 'unset'

Can you do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants