Skip to content

Commit

Permalink
Implement details and summary styling in a UA sheet.
Browse files Browse the repository at this point in the history
This preserves the revert keyword behavior. This doesn't match the spec
to the letter, see whatwg/html#8610, but I
think it's probably ok to keep behavior for now. Changing to match the
spec would avoid duplicating the details.css summary rule.

Differential Revision: https://phabricator.services.mozilla.com/D164439

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1804925
gecko-commit: 5c61586b4d42a68cb9d49e2afa5db3c4efc3004b
gecko-reviewers: TYLin
  • Loading branch information
emilio authored and moz-wptsync-bot committed Dec 13, 2022
1 parent 5c642c3 commit c196035
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions html/rendering/the-details-element/details-revert-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<style>
summary {
display: list-item;
counter-increment: list-item 0;
list-style: disclosure-closed inside;
}
details[open] > summary {
list-style-type: disclosure-open;
}
</style>
<details>
<summary>Example</summary>
</details>
<details open>
<summary>Example</summary>
</details>
18 changes: 18 additions & 0 deletions html/rendering/the-details-element/details-revert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf-8">
<link rel="help" href="https://html.spec.whatwg.org/#the-details-and-summary-elements">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1804925">
<link rel="match" href="details-revert-ref.html">
<style>
summary {
display: revert;
counter-increment: revert;
list-style: revert;
}
</style>
<details>
<summary>Example</summary>
</details>
<details open>
<summary>Example</summary>
</details>

0 comments on commit c196035

Please sign in to comment.