Skip to content

Commit b7d6686

Browse files
authored
Add interactive example for ::details-content (#38421)
1 parent 8f10bc9 commit b7d6686

File tree

1 file changed

+20
-1
lines changed
  • files/en-us/web/css/_doublecolon_details-content

1 file changed

+20
-1
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,26 @@ browser-compat: css.selectors.details-content
99

1010
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+
{{InteractiveExample("CSS Demo: ::details-content", "tabbed-shorter")}}
13+
14+
```css interactive-example
15+
details[open]::details-content {
16+
color: dodgerblue;
17+
padding: 0.5em;
18+
border: thin solid grey;
19+
}
20+
```
21+
22+
```html interactive-example
23+
<details open>
24+
<summary>Example summary</summary>
25+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
26+
<p>
27+
Architecto cupiditate ea optio modi quas sequi, esse libero asperiores
28+
debitis eveniet commodi hic ad.
29+
</p>
30+
</details>
31+
```
1332

1433
## Syntax
1534

0 commit comments

Comments
 (0)