Skip to content

Commit 02cc081

Browse files
committed
Address comments
1 parent 83fe58b commit 02cc081

File tree

1 file changed

+37
-2
lines changed
  • files/en-us/web/css/_doublecolon_details-content

1 file changed

+37
-2
lines changed

files/en-us/web/css/_doublecolon_details-content/index.md

+37-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ browser-compat: css.selectors.details-content
77

88
{{CSSRef}}
99

10-
The **`::details-content`** [CSS](/en-US/docs/Web/CSS) [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) represents the contents of an {{HTMLElement("details") }}.
10+
The **`::details-content`** [CSS](/en-US/docs/Web/CSS) [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) represents the expandable/collapsible contents of a {{HTMLElement("details")}} element.
1111

12-
{{EmbedInteractiveExample("pages/tabbed/pseudo-element-details-content.html", "tabbed-shorter")}}
12+
[//]: # '{{EmbedInteractiveExample("pages/tabbed/pseudo-element-details-content.html", "tabbed-shorter")}}'
1313

1414
## Syntax
1515

@@ -38,6 +38,40 @@ details::details-content {
3838
}
3939
```
4040

41+
#### Result
42+
43+
{{EmbedLiveSample("Basic_example", "100%", 150)}}
44+
45+
### Transition example
46+
47+
#### HTML
48+
49+
```html
50+
<details>
51+
<summary>Click me</summary>
52+
<p>Here is some content</p>
53+
</details>
54+
```
55+
56+
#### CSS
57+
58+
```css
59+
details::details-content {
60+
opacity: 0;
61+
transition:
62+
content-visibility 300ms allow-discrete,
63+
opacity 300ms;
64+
}
65+
66+
details[open]::details-content {
67+
opacity: 1;
68+
}
69+
```
70+
71+
#### Result
72+
73+
{{EmbedLiveSample("Transition_example", "100%", 150)}}
74+
4175
## Specifications
4276

4377
{{Specifications}}
@@ -49,3 +83,4 @@ details::details-content {
4983
## See also
5084

5185
- [`<details>`](/en-US/docs/Web/HTML/Element/details)
86+
- [`<summary>`](/en-US/docs/Web/HTML/Element/summary)

0 commit comments

Comments
 (0)