Skip to content

Commit a352041

Browse files
committed
update stylesheets
1 parent 96950cb commit a352041

7 files changed

Lines changed: 21 additions & 32 deletions

File tree

packages/web-components/src/dialog/dialog.styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
:host([type='non-modal']) dialog {
2424
inset: 0;
25-
position: fixed;
2625
z-index: 2;
2726
overflow: auto;
2827
}

packages/web-components/src/dropdown/dropdown.styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
}
77

88
:host {
9-
anchor-name: --dropdown-trigger;
109
box-sizing: border-box;
1110
color: var(--colorNeutralForeground1);
1211
cursor: pointer;

packages/web-components/src/listbox/listbox.styles.css

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
box-sizing: border-box;
1414
flex-direction: column;
1515
margin: 0;
16-
min-width: 160px;
16+
min-inline-size: 160px;
1717
padding: var(--spacingHorizontalXS);
1818
row-gap: var(--spacingHorizontalXXS);
1919
width: auto;
@@ -26,26 +26,20 @@
2626

2727
@supports (anchor-name: --anchor) {
2828
:host([popover]) {
29-
position: absolute;
30-
margin-block-start: 0;
31-
max-height: var(--listbox-max-height, calc(50vh - anchor-size(self-block)));
32-
min-width: anchor-size(width);
33-
position-anchor: --dropdown;
34-
position-area: block-end span-inline-end;
35-
position-try-fallbacks: flip-inline, flip-block, --flip-block, block-start;
36-
}
37-
38-
@position-try --flip-block {
39-
bottom: anchor(top);
40-
top: unset;
29+
position: fixed;
30+
max-block-size: var(--listbox-max-height, calc(50vh - anchor-size(self-block)));
31+
min-inline-size: anchor-size(inline);
32+
inset-block-start: anchor(end);
33+
inset-inline-start: anchor(start);
34+
position-try-fallbacks: flip-block, flip-inline, flip-inline flip-block;
4135
}
4236
}
4337

4438
@supports not (anchor-name: --anchor) {
4539
:host([popover]) {
4640
margin-block-start: var(--margin-offset, 0);
47-
max-height: var(--listbox-max-height, 50vh);
48-
position: fixed;
41+
max-block-size: var(--listbox-max-height, 50vh);
42+
position: absolute;
4943
}
5044

5145
:host([popover]:state(flip-block)) {

packages/web-components/src/menu-item/menu-item.styles.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@
124124
::slotted([popover]) {
125125
margin: 0;
126126
max-height: var(--menu-max-height, auto);
127-
position: absolute;
127+
position: fixed;
128128
position-anchor: --menu-trigger;
129-
position-area: inline-end span-block-end;
129+
inset: unset;
130+
inset-block-start: anchor(start);
131+
inset-inline-start: anchor(end);
130132
position-try-fallbacks: flip-inline, block-start, block-end;
131133
z-index: 1;
132134
}
@@ -135,10 +137,6 @@
135137
display: none;
136138
}
137139

138-
::slotted([popover]:popover-open) {
139-
inset: unset;
140-
}
141-
142140
/* Fallback for no anchor-positioning */
143141
@supports not (anchor-name: --menu-trigger) {
144142
::slotted([popover]) {

packages/web-components/src/menu/menu.styles.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@
1313
margin: 0;
1414
max-height: var(--menu-max-height, auto);
1515
position-anchor: --menu-trigger;
16-
position-area: block-end span-inline-end;
16+
inset: unset;
17+
inset-block-start: anchor(end);
18+
inset-inline-start: anchor(start);
1719
position-try-fallbacks: flip-block;
18-
position: absolute;
20+
position: fixed;
1921
z-index: 1;
2022
}
2123

2224
:host([split]) ::slotted([popover]) {
23-
position-area: block-end span-inline-start;
24-
}
25-
26-
::slotted([popover]:popover-open) {
27-
inset: unset;
25+
inset-inline-start: auto;
26+
inset-inline-end: anchor(end);
2827
}
2928

3029
::slotted([popover]:not(:popover-open)) {

packages/web-components/src/tablist/tablist.styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
content: '';
174174
inline-size: 100%;
175175
inset: auto auto anchor(end) anchor(center);
176-
position: absolute;
176+
position: fixed;
177177
position-anchor: --tab;
178178
transform: translateX(-50%);
179179
transition-property: inset-inline, width;

packages/web-components/src/tooltip/tooltip.styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
padding: 4px var(--spacingHorizontalMNudge) 6px;
3232
position: absolute;
3333
position-area: var(--position-area);
34-
position-try-options: var(--position-try-options);
34+
position-try-fallbacks: var(--position-try-options);
3535
width: auto;
3636
z-index: 1;
3737
}

0 commit comments

Comments
 (0)