Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html

Issue 1807653002: [css-flexbox] Correctly handle percentage sizing in the main axis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary brackets Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <title>CSS Flexbox: Definite main sizes</title>
4
5 <style>
6 .rect {
7 width: 50px;
8 height: 50px;
9 background-color: green;
10 }
11
12 .flexbox {
13 border: 3px solid black;
14 }
15
16 .flexbox > div > div {
17 overflow: hidden;
18 }
19
20 </style>
21
22 <link rel="stylesheet" href="resources/flexbox.css">
23 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
24 <link rel="author" title="Google Inc." href="https://www.google.com/">
25
26 <script src="../../resources/testharness.js"></script>
27 <script src="../../resources/testharnessreport.js"></script>
28 <script src="../../resources/check-layout-th.js"></script>
29
30 <body onload="checkLayout('.flexbox')" style="height: 800px;">
31 <div id=log></div>
32
33 <p>Simple case of percentage resolution:</p>
34 <div class="flexbox" style="width: 300px;">
35 <div class="flex-one" data-expected-width="250">
36 <div style="width: 50%;" data-expected-width="125">
37 <div class="rect"></div>
38 </div>
39 </div>
40 <div class="rect flex-none"></div>
41 </div>
42
43 <p>auto flex-basis. However, as this is a width, we follow regular width
44 rules and resolve the percentage:</p>
45 <div class="flexbox" style="width: 300px;">
46 <div data-expected-width="50">
47 <div style="width: 50%;" data-expected-width="25">
48 <div class="rect"></div>
49 </div>
50 </div>
51 <div class="rect flex-none"></div>
52 </div>
53
54 <p>Simple case of percentage resolution, columns:</p>
55 <div class="flexbox column" style="height: 300px;">
56 <div class="flex-one" data-expected-height="250">
57 <div style="height: 50%;" data-expected-height="125">
58 <div class="rect"></div>
59 </div>
60 </div>
61 <div class="rect flex-none"></div>
62 </div>
63
64 <p>auto flex-basis, we should ignore the percentage height here:</p>
65 <div class="flexbox column" style="height: 300px;">
66 <div data-expected-height="50">
67 <div style="height: 50%;" data-expected-height="50">
68 <div class="rect"></div>
69 </div>
70 </div>
71 <div class="rect flex-none"></div>
72 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698