Skip to content
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

fix: change to new css anchor positioning properties #33139

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: change to new css anchor positioning properties",
"packageName": "@fluentui/web-components",
"email": "machi@microsoft.com",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions packages/web-components/src/menu-item/menu-item.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export const styles = css`
}
::slotted([popover]) {
inset-area: inline-end span-block-end;
margin: 0;
max-height: var(--menu-max-height, auto);
position: absolute;
position-anchor: --menu-trigger;
position-try-options: flip-inline, inset-area(block-start);
position-area: inline-end span-block-end;
position-try-fallbacks: flip-inline;
z-index: 1;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/src/menu/menu.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const styles = css`
}
::slotted([popover]) {
inset-area: block-end span-inline-end;
margin: 0;
max-height: var(--menu-max-height, auto);
position-anchor: --menu-trigger;
position-try-options: flip-block;
position-area: block-end span-inline-end;
position-try-fallbacks: flip-block;
position: absolute;
z-index: 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Menu as FluentMenu } from '../menu/menu.js';
type Story = StoryObj<FluentMenu>;

const defaultSlottedContent = html`
<fluent-menu-list style="inset-area: block-end span-inline-start;">
<fluent-menu-list style="position-area: block-end span-inline-start;">
<fluent-menu-item>Menu item 1</fluent-menu-item>
<fluent-menu-item>Menu item 2</fluent-menu-item>
<fluent-menu-item>Menu item 3</fluent-menu-item>
Expand Down
Loading