Skip to content

Commit af7d6f4

Browse files
committed
[css-display-3] Remove outdated display: contents test.
The flex spec was updated a while ago to use the following language for align-items: > align-items sets the default alignment for all of the flex container’s items, > including anonymous flex items. align-self allows this default alignment to > be overridden for individual flex items. After that, the CSSWG resolved that align-self: auto computes to itself[1][2]. Thus, this test is invalid. [1]: w3c/csswg-drafts#440 (comment) [2]: https://lists.w3.org/Archives/Public/www-style/2016Sep/0041.html
1 parent 50a861a commit af7d6f4

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

css-display-3/display-contents-computed-style.html

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515

1616
#t3 .contents { color: green }
1717

18-
#t4 { display: flex; align-items: center }
19-
#t4 .contents { align-items: baseline }
20-
#t4 span { align-self: auto }
21-
22-
#t5 {
18+
#t4 {
2319
width: auto;
2420
height: 50%;
2521
margin-left: 25%;
@@ -42,7 +38,7 @@
4238
<span></span>
4339
</div>
4440
</div>
45-
<div id="t5" class="contents"></div>
41+
<div id="t4" class="contents"></div>
4642
<script>
4743
test(function(){
4844
assert_equals(getComputedStyle(document.querySelector("#t1")).display, "contents");
@@ -57,11 +53,7 @@
5753
}, "display:contents element as inherit parent - implicit inheritance");
5854

5955
test(function(){
60-
assert_equals(getComputedStyle(document.querySelector("#t4 span")).alignSelf, "baseline");
61-
}, "align-self:auto resolution for flex item inside display:contents");
62-
63-
test(function(){
64-
var computed = getComputedStyle(document.querySelector("#t5"));
56+
var computed = getComputedStyle(document.querySelector("#t4"));
6557
assert_equals(computed.width, "auto");
6658
assert_equals(computed.height, "50%");
6759
assert_equals(computed.marginLeft, "25%");

0 commit comments

Comments
 (0)