Skip to content

Commit 2506a7e

Browse files
committed
ui: shorten ThemeProvider workaround comments, link Base UI issue
Reference mui/base-ui#4622 and keep note that rules stay outside @layer to override ThemeProvider’s unlayered display: contents. Made-with: Cursor
1 parent 64973e7 commit 2506a7e

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

packages/ui/src/dialog/style.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

33
/*
4-
* Base UI ≥1.4.0 uses checkVisibility() to detect tabbable elements.
5-
* checkVisibility() returns false for display:contents (no generated box),
6-
* which breaks the focus-trap when ThemeProvider wraps the popup.
4+
* Temporary workaround for a Base UI tabbability regression with
5+
* checkVisibility() and display: contents.
6+
* See: https://github.com/mui/base-ui/issues/4622
77
*
8-
* This rule must be unlayered to override ThemeProvider's unlayered
9-
* display:contents.
8+
* This must stay outside the CSS layers to override ThemeProvider's
9+
* unlayered display: contents.
1010
*/
1111
[data-wpds-theme-provider-id]:has(> .popup) {
1212
display: block;

packages/ui/src/popover/style.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

33
/*
4-
* Base UI ≥1.4.0 uses checkVisibility() to detect tabbable elements.
5-
* checkVisibility() returns false for display:contents (no generated box),
6-
* which breaks the focus-trap when ThemeProvider wraps the popup.
4+
* Temporary workaround for a Base UI tabbability regression with
5+
* checkVisibility() and display: contents.
6+
* See: https://github.com/mui/base-ui/issues/4622
77
*
8-
* This rule must be unlayered to override ThemeProvider's unlayered
9-
* display:contents.
8+
* This must stay outside the CSS layers to override ThemeProvider's
9+
* unlayered display: contents.
1010
*/
1111
[data-wpds-theme-provider-id]:has(> .popup) {
1212
display: block;

packages/ui/src/tooltip/style.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

33
/*
4-
* Base UI ≥1.4.0 uses checkVisibility() to detect tabbable elements.
5-
* checkVisibility() returns false for display:contents (no generated box),
6-
* which breaks the focus-trap when ThemeProvider wraps the popup.
4+
* Temporary workaround for a Base UI tabbability regression with
5+
* checkVisibility() and display: contents.
6+
* See: https://github.com/mui/base-ui/issues/4622
77
*
8-
* This rule must be unlayered to override ThemeProvider's unlayered
9-
* display:contents.
8+
* This must stay outside the CSS layers to override ThemeProvider's
9+
* unlayered display: contents.
1010
*/
1111
[data-wpds-theme-provider-id]:has(> .popup) {
1212
display: block;

packages/ui/src/utils/css/item-popup.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

33
/*
4-
* Base UI ≥1.4.0 uses checkVisibility() to detect tabbable elements.
5-
* checkVisibility() returns false for display:contents (no generated box),
6-
* which breaks the focus-trap when ThemeProvider wraps the popup.
4+
* Temporary workaround for a Base UI tabbability regression with
5+
* checkVisibility() and display: contents.
6+
* See: https://github.com/mui/base-ui/issues/4622
77
*
8-
* This rule must be unlayered to override ThemeProvider's unlayered
9-
* display:contents.
8+
* This must stay outside the CSS layers to override ThemeProvider's
9+
* unlayered display: contents.
1010
*/
1111
[data-wpds-theme-provider-id]:has(> .popup) {
1212
display: block;

0 commit comments

Comments
 (0)