diff --git a/astro.config.ts b/astro.config.ts index 46fcd1b..329fe70 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -16,7 +16,7 @@ import sitemap from '@astrojs/sitemap'; export default defineConfig({ image: { remotePatterns: [{ protocol: "https" }] }, - devToolbar: { enabled: true }, + devToolbar: { enabled: false }, site: "https://vtbag.dev", compressHTML: false, @@ -214,11 +214,11 @@ function sidebar() { }, { label: "Styling View Transitions", link: "/basics/styling/" }, { label: "JavaScript API", link: "/basics/javascript/" }, - { label: "Playing Hide & Seek", link: "/basics/hide-and-seek/" }, + { label: "Playing Hide & Seek", link: "/basics/hide-and-seek/", + badge: { text: "Updated!", variant: "success" } as Badge }, { label: "API Levels and Implications", - link: "/basics/levels/", - badge: { text: "New!", variant: "success" } as Badge, + link: "/basics/levels/" }, { label: "Web Framework Support", link: "/basics/frameworks/" }, ], @@ -233,8 +233,7 @@ function sidebar() { { label: "Utensil Drawer", link: "/tools/utensil-drawer/", - badge: { text: "Updated!", variant: "success" } as Badge, - }, + }, ], }, { @@ -250,7 +249,6 @@ function sidebar() { { label: "Playing", link: "/fwvt/playing/", - badge: { text: "New!", variant: "success" } as Badge, }, ], }, @@ -275,7 +273,6 @@ function sidebar() { { label: "Why View Transitions Might Fail", link: "tips/view-transition-fails-and-fixes/", - badge: { text: "Updated!", variant: "success" } as Badge }, ], }, diff --git a/src/content/docs/basics/hide-and-seek.mdx b/src/content/docs/basics/hide-and-seek.mdx index 49e9857..e821cd6 100644 --- a/src/content/docs/basics/hide-and-seek.mdx +++ b/src/content/docs/basics/hide-and-seek.mdx @@ -203,9 +203,14 @@ In the early versions of the View Transition API, the transition groups form a f Nested view transition groups introduce the ability to clip images not only within their own group but also using their parent or any ancestor further up the hierarchy. The example to the right is built with nested view transition groups. If it doesn't look right, check whether your [browser has support](/basics/test-page/) for them. -Clipping the list elements at the list container prevents them from being drawn outside the list element. However, if clipped at the parent group, they seem to fly in front of the scrollbars and the border. +Clipping the peudos of the list elements at the `::view-transition-group-children` pseudo of th list container prevents them from being drawn outside the list element. However, they seem to fly in front of the scrollbars. [This will change.](https://issues.chromium.org/issues/475236700). In the meanwhile you make the group-children pseudo some pixels smaller to keep the scrollbar visible during the animation. -Clipping at the `::view-transition-group-children` element respects the border. If you make it some pixels smaller, you can keep the scrollbar visible during the animation. +```css + ::view-transition-group-children(ul) { + overflow: clip; + width: calc(100% - 18px); // quick fix for https://issues.chromium.org/issues/475236700 + } +``` ### Clipping with **Scoped** View Transitions @@ -219,12 +224,32 @@ Clipping at the `::view-transition-group-children` element respects the border. > -_Scoped_ view transitions are still a bit further in the future. Once available, they will also enable clipping view transition animations on any DOM element. Early implementations really worked well for clipping. In contrast to nested view transition groups, the elements used to move behind the scrollbars. - -Current implementations of scoped view transitions do not seem to help much for clipping. Have to revisit this examples shortly. +_Scoped_ view transitions are still a bit further in the future. Once available, they will also enable clipping view transition animations. +They will even enable two different approaches. + +The view transition pseudo elements can be clipped at containers outside the view transition root. In or example, we could run a scoped view transition on the (overflowing) `