Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-pseudo-4] Add ::details-content pseudo-element. #10379

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,33 @@ File Selector Button: the ''::file-selector-button'' pseudo-element</h3>
<pre class="lang-css">::file-selector-button { border: 3px solid green }</pre>
</div>

<h3 id="details-content-pseudo">
Expandable contents of details element: the ''::details-content'' pseudo-element</h3>

The <dfn>::details-content</dfn> pseudo-element targets
the additional information in a a <{details}> element
that can be expanded or collapsed.
It is a [=part-like pseudo-element=].

There is no restriction on which properties apply to the
''::details-content'' pseudo-element.

<div class="example" id="details-content-example">
For example, the following example would
animate the opacity of the additional information
when the <{details}> element opens:

<pre class="lang-css">details::details-content {
opacity: 0;
transition: content-visibility 300ms allow-discrete step-end, opacity 300ms;
}

details[open]::details-content {
opacity: 1;
transition: content-visibility 300ms allow-discrete step-start, opacity 300ms;
}</pre>
</div>

<h2 id="interactions">
Overlapping Pseudo-element Interactions</h2>

Expand Down