File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -1666,16 +1666,25 @@ Expandable contents of details element: the ''::details-content'' pseudo-element
16661666 when the <{details}> element opens:
16671667
16681668 <pre class="lang-css">
1669- details::details-content {
1670- opacity: 0;
1671- transition: content-visibility 300ms allow-discrete, opacity 300ms;
1672- }
1673-
1674- details[open] ::details-content {
1675- opacity: 1;
1676- }</pre>
1669+ details::details-content {
1670+ opacity: 0;
1671+ transition: content-visibility 300ms allow-discrete, opacity 300ms;
1672+ }
1673+
1674+ details[open] ::details-content {
1675+ opacity: 1;
1676+ }</pre>
16771677 </div>
16781678
1679+ Note: The default UA stylesheet styles a closed ''::details-content''
1680+ with ''content-visibility: hidden'' ,
1681+ so the contents are still considered present for the purpose of find-in-page
1682+ and similar features.
1683+ This, however, only suppresses the display of the pseudo-elements's <em> contents</em> ;
1684+ if margin, borders, etc are set on the pseudo-element, they'll still be visible.
1685+ Use ''[open]::details-content'' to apply these styles if that's undesirable.
1686+
1687+
16791688<h2 id="interactions">
16801689Overlapping Pseudo-element Interactions</h2>
16811690
You can’t perform that action at this time.
0 commit comments