-
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.
[css-flexbox] Move intrinsic-min-width-applies-with-fixed-width.html …
…to WPT Migrate this test out of third_party/blink/web_tests/css3/flexbox and into the WPT-specific directory, adding links to the relevant specs and a test assertion describing its purpose. Bug: 1063749 Change-Id: I2a21bb2f0409faff09d8f5201e5894f1b3ef6865 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2120664 Reviewed-by: Robert Ma <robertma@chromium.org> Reviewed-by: David Grogan <dgrogan@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#753649}
- Loading branch information
1 parent
34291df
commit bd2362e
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
css/css-flexbox/intrinsic-min-width-applies-with-fixed-width.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,81 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Flexbox: Proper min-width intrinsic size with display: flex</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-containers"> | ||
<link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#min-max-widths"> | ||
<meta name="assert" content="This test checks that min-width intrinsic size still applies if a fixed width is set."> | ||
<style> | ||
.min-content { | ||
width: 10px; | ||
min-width: -webkit-min-content; | ||
min-width: -moz-min-content; | ||
min-width: -ie-min-content; | ||
min-width: -o-min-content; | ||
min-width: min-content; | ||
outline: 2px solid; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.max-content { | ||
width: 10px; | ||
min-width: -webkit-max-content; | ||
min-width: -moz-max-content; | ||
min-width: -ie-max-content; | ||
min-width: -o-max-content; | ||
min-width: max-content; | ||
outline: 2px solid; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.fit-content { | ||
width: 10px; | ||
min-width: -webkit-fit-content; | ||
min-width: -moz-fit-content; | ||
min-width: -ie-fit-content; | ||
min-width: -o-fit-content; | ||
min-width: fit-content; | ||
outline: 2px solid; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.child { | ||
width: 20px; | ||
height: 20px; | ||
background-color: pink; | ||
} | ||
div { | ||
display: inline-block; | ||
line-height: 0; | ||
} | ||
</style> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/check-layout-th.js"></script> | ||
|
||
<body onload="checkLayout('body > div')"> | ||
<div id=log></div> | ||
|
||
<div class="min-content" data-expected-width=20> | ||
<div class="child"></div><div class="child"></div> | ||
</div> | ||
|
||
<div class="max-content" data-expected-width=40> | ||
<div class="child"></div><div class="child"></div> | ||
</div> | ||
|
||
<div class="fit-content" data-expected-width=40> | ||
<div class="child"></div><div class="child"></div> | ||
</div> | ||
|
||
<div style="width: 30px"> | ||
<div class="fit-content" data-expected-width=30> | ||
<div class="child"></div><div class="child"></div> | ||
</div> | ||
</div> | ||
|
||
<div style="width: 10px"> | ||
<div class="fit-content" data-expected-width=20> | ||
<div class="child"></div><div class="child"></div> | ||
</div> | ||
</div> | ||
|
||
</body> |