Skip to content

Commit

Permalink
[css-display-3] Remove outdated display: contents test.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
emilio committed Feb 22, 2017
1 parent 50a861a commit af7d6f4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions css-display-3/display-contents-computed-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@

#t3 .contents { color: green }

#t4 { display: flex; align-items: center }
#t4 .contents { align-items: baseline }
#t4 span { align-self: auto }

#t5 {
#t4 {
width: auto;
height: 50%;
margin-left: 25%;
Expand All @@ -42,7 +38,7 @@
<span></span>
</div>
</div>
<div id="t5" class="contents"></div>
<div id="t4" class="contents"></div>
<script>
test(function(){
assert_equals(getComputedStyle(document.querySelector("#t1")).display, "contents");
Expand All @@ -57,11 +53,7 @@
}, "display:contents element as inherit parent - implicit inheritance");

test(function(){
assert_equals(getComputedStyle(document.querySelector("#t4 span")).alignSelf, "baseline");
}, "align-self:auto resolution for flex item inside display:contents");

test(function(){
var computed = getComputedStyle(document.querySelector("#t5"));
var computed = getComputedStyle(document.querySelector("#t4"));
assert_equals(computed.width, "auto");
assert_equals(computed.height, "50%");
assert_equals(computed.marginLeft, "25%");
Expand Down

0 comments on commit af7d6f4

Please sign in to comment.