-
Notifications
You must be signed in to change notification settings - Fork 715
Use specific classes for fluent menu items when styling to prevent text overflow #9827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e226eda
0b4e80d
e1925e2
a57cf72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -822,7 +822,12 @@ fluent-tooltip[anchor="dialog_close"] > div { | |||||||||||||||||||||||||||||||||||||||
| margin-right: 3px; | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| fluent-menu-item::part(content) { | ||||||||||||||||||||||||||||||||||||||||
| .aspire-menu-container > fluent-menu > fluent-menu-item::part(content) { | ||||||||||||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||||||||||||
| text-overflow: ellipsis; | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
| text-overflow: ellipsis; | |
| text-overflow: ellipsis; | |
| overflow: hidden; | |
| white-space: nowrap; |
Copilot
AI
Jun 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Both scoped and utility selectors set identical properties (width: 100% and text-overflow: ellipsis). Consider extracting them into a shared rule or CSS variable to reduce duplication.
| .aspire-menu-container > fluent-menu > fluent-menu-item::part(content) { | |
| width: 100%; | |
| text-overflow: ellipsis; | |
| } | |
| .overflow-fluent-menu-item::part(content) { | |
| width: 100%; | |
| text-overflow: ellipsis; | |
| .full-width-ellipsis { | |
| width: 100%; | |
| text-overflow: ellipsis; | |
| } | |
| .aspire-menu-container > fluent-menu > fluent-menu-item::part(content) { | |
| @apply .full-width-ellipsis; | |
| } | |
| .overflow-fluent-menu-item::part(content) { | |
| @apply .full-width-ellipsis; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS selector assumes
.aspire-menu-containerwraps the<fluent-menu>, but you applied the class directly on the<FluentMenu>element. As a result the rule won’t match. Either move the class to a parent container or adjust the selector to targetfluent-menu.aspire-menu-container.