diff --git a/.changeset/layer-dialog-native-scrollbar.md b/.changeset/layer-dialog-native-scrollbar.md new file mode 100644 index 000000000..9f7e38ae3 --- /dev/null +++ b/.changeset/layer-dialog-native-scrollbar.md @@ -0,0 +1,5 @@ +--- +"@cloudflare/kumo": patch +--- + +Hide the native scrollbars of the LayerDialog body and Sidebar content with Kumo's own CSS. Base UI only hides them with a style element it injects into the document head, so client routers that swap the head (such as Astro's ClientRouter) or a Content Security Policy that blocks inline styles could leave empty scrollbar tracks along the dialog body. diff --git a/packages/kumo/src/components/layer-dialog/layer-dialog.test.tsx b/packages/kumo/src/components/layer-dialog/layer-dialog.test.tsx index 6fde783f1..8cb96a285 100644 --- a/packages/kumo/src/components/layer-dialog/layer-dialog.test.tsx +++ b/packages/kumo/src/components/layer-dialog/layer-dialog.test.tsx @@ -538,6 +538,20 @@ describe("LayerDialog.Body edge clipping", () => { cleanup(); }); + + it("hides native scrollbars without Base UI's injected style", () => { + // Base UI forces `overflow: scroll` on the viewport and hides the native + // scrollbars only through a