From 52b6bb6ffe60bb14c336c25652a476957503dfd6 Mon Sep 17 00:00:00 2001 From: yash <49yash@gmail.com> Date: Sun, 29 Dec 2024 17:24:27 +0530 Subject: [PATCH] keep active accordion in viewport --- .../accordion/demos/hero/css-modules/index.module.css | 4 ++++ .../components/accordion/demos/hero/tailwind/index.tsx | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/css-modules/index.module.css b/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/css-modules/index.module.css index 839037f44f..b13cc2b4b2 100644 --- a/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/css-modules/index.module.css +++ b/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/css-modules/index.module.css @@ -10,6 +10,10 @@ .Item { border-bottom: 1px solid var(--color-gray-200); + + &[data-closed] { + overflow-anchor: none; + } } .Header { diff --git a/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/tailwind/index.tsx b/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/tailwind/index.tsx index 8ba8a16ddd..0ae5fb104e 100644 --- a/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/tailwind/index.tsx +++ b/docs/src/app/(public)/(content)/react/components/accordion/demos/hero/tailwind/index.tsx @@ -4,7 +4,7 @@ import { Accordion } from '@base-ui-components/react/accordion'; export default function ExampleAccordion() { return ( - + What is Base UI? @@ -19,7 +19,7 @@ export default function ExampleAccordion() { - + How do I get started? @@ -34,7 +34,7 @@ export default function ExampleAccordion() { - + Can I use it for my project?