-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test asserting the display property of <details> is ignored
Chrome, Safari, and Firefox pass. Edge hasn't implemented yet. The test still holds for the proposed new spec text in whatwg/html#3686 This scenario is discussed at the end of whatwg/html#603 but the conclusion drawn appears (to me) to be opposite what Chrome, Safari, and Firefox do. Related other issues: w3c/csswg-drafts#2084 whatwg/html#1839 Bug: 635282 Change-Id: Ice95225b3c9d5d90b80c657643d036490fd2e1b2
- Loading branch information
1 parent
1d73b48
commit e9f418f
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
html/rendering/the-details-element/details-display-property-is-ignored-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel="author" title="David Grogan" href="[email protected]"> | ||
From <a href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">html.spec.whatwg.org</a>: | ||
|
||
<blockquote> | ||
The details element is expected to render as a block box. The element's shadow | ||
tree is expected to take the element's first summary element child, if any, and | ||
place it in a first block box container, and then take the element's remaining | ||
descendants, if any, and place them in a second block box container. | ||
</blockquote> | ||
|
||
<details display:flex> should be ignored. Otherwise details would render as | ||
something other than a block box. | ||
|
||
<details open> | ||
<summary>This is the summary.</summary> | ||
<div>thing 1</div> | ||
thing 2 | ||
</details> |
25 changes: 25 additions & 0 deletions
25
html/rendering/the-details-element/details-display-property-is-ignored.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel="author" title="David Grogan" href="[email protected]"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements"> | ||
<link rel="match" href="details-display-property-is-ignored-ref.html"> | ||
<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=635282" /> | ||
<meta name="assert" content="The display property is ignored on details elements and is instead always rendered as a block box." /> | ||
|
||
From <a href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">html.spec.whatwg.org</a>: | ||
|
||
<blockquote> | ||
The details element is expected to render as a block box. The element's shadow | ||
tree is expected to take the element's first summary element child, if any, and | ||
place it in a first block box container, and then take the element's remaining | ||
descendants, if any, and place them in a second block box container. | ||
</blockquote> | ||
|
||
<details display:flex> should be ignored. Otherwise details would render as | ||
something other than a block box. | ||
|
||
<details open style="display:flex;"> | ||
<summary>This is the summary.</summary> | ||
<div>thing 1</div> | ||
thing 2 | ||
</details> |