testing/web-platform/tests/css/css-flexbox/align-content-wrap-004.html
author Christian Biesinger <cbiesinger@chromium.org>
Mon, 19 Nov 2018 18:45:25 +0000
changeset 506761 15344e2bbf8a82061d9c236343f8d8994aee08dc
parent 506506 d7e0ada6193474f4e446485988d6f10b992499b2
permissions -rw-r--r--
Bug 1507345 [wpt PR 14062] - [css-flex] align-content should apply even when there's just a single line, a=testonly Automatic update from web-platform-tests[css-flex] align-content should apply even when there's just a single line In Jan 2015 the spec changed in https://drafts.csswg.org/css-flexbox/#change-201409-align-content-wrapping Change our code accordingly. This effectively reverts commit crrev.com/290823003 and relands crrev.com/2191683003 align-content-wrap-004 is a test for bug 641789, which was a regression from the previous attempt at landing this patch. Bug: 599828 Change-Id: I8de127c19203854922eb23a626cee4de9a772f22 Reviewed-on: https://chromium-review.googlesource.com/c/1323906 Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#608449} -- wpt-commits: 34ecd56f063821c113fd20bcb05b80aafd82d787 wpt-pr: 14062

<!DOCTYPE html>
<link rel="author" title="Google LLC" href="http://www.google.com" />
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#cross-sizing" />
<title>css-flexbox: Tests that we size items in a wrapping column flexbox as fit-content</title>
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />

<style>
.flex {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  flex-direction: column;
  align-items: flex-start;
  width: 100px;
  line-height: 1;
}
.flex > div {
  min-height: 0;
  background: green;
}
.flex * {
  vertical-align: top;
}
</style>

<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>

<div class="flex">
  <div style="align-self: stretch;">
    <div style="display: inline-block; width: 20px; height: 40px;"></div>
  </div>
  <div style="height: 60px;">
    <div style="display: inline-block; height: 15px; width: 20px;"></div>
    <div style="display: inline-block; height: 15px; width: 100px;"></div>
    <div style="display: inline-block; height: 15px; width: 100px;"></div>
    <div style="display: inline-block; height: 15px; width: 100px;"></div>
  </div>
</div>