-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 Reviewed-on: https://chromium-review.googlesource.com/1153651 Commit-Queue: David Grogan <dgrogan@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#589388}
- Loading branch information
1 parent
ddb3e30
commit 9d5d9aa
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
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,21 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> | ||
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. | ||
<hr> | ||
|
||
<details open> | ||
<summary>This is the summary.</summary> | ||
<div>thing 1</div> | ||
thing 2 | ||
</details> |
26 changes: 26 additions & 0 deletions
26
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,26 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> | ||
<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. | ||
<hr> | ||
|
||
<details open style="display:flex;"> | ||
<summary>This is the summary.</summary> | ||
<div>thing 1</div> | ||
thing 2 | ||
</details> |