Skip to content

Commit b8ec2e7

Browse files
martrappCopilot
andcommitted
Enhance documentation on hiding view transition names for pseudo-elements
Co-authored-by: Copilot <copilot@github.com>
1 parent a695707 commit b8ec2e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/content/docs/basics/pseudos.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ There are two main cases where the View Transition API ignores view transition n
176176

177177
There are several ways to prevent an element from rendering and therefore hide its view transition name from the API.
178178

179-
On the HTML side, you can hide elements by adding the `hidden` attribute or by placing them inside a closed `<details>` element.
179+
On the HTML side, you can hide elements by adding the `hidden` attribute or by placing them inside a closed `<details>` element. For the pseudo-elements `::before` and `::after`, setting `content: none` hides their view transition names.
180180

181181
|HTML|Effect|
182182
|-|-|
183183
|`hidden` attribute|Ignores view transition names inside the subtree rooted at the element|
184-
|closed `<details>` element|Ignores view transition names inside the `<details>` element, as long as they are not part of the first `<summary>` child|
185-
184+
|Closed `<details>` element|Ignores view transition names inside the `<details>` element, as long as they are not part of the first `<summary>` child|
185+
|A `::before` or `::after` pseudo-element with `content: none`|Ignores the view transition name of the pseudo-element|
186186
<style>{`
187187
#hiding-properties td:nth-child(2) {
188188
white-space: nowrap;

0 commit comments

Comments
 (0)