summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/min-width-height-auto-overflow.html
blob: b90a8474533432ae75affd55406e231a29d8e546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<style>
.grid {
    display: grid;
    grid-template-columns: 50px;
    grid-template-rows: 50px;
    height: 50px;
    width: 50px;
    margin: 50px;
}

.item {
    font: 50px/1 Ahem;
}

.overflowVisible {
    overflow: visible;
}

.overflowHidden {
    overflow: hidden;
}

.overflowScroll {
    overflow: scroll;
}

.overflowAuto {
    overflow: auto;
}
</style>

<p>This test checks that min-width|height auto behavior for grid items only applies if overflow is visible.</p>
<p>The test passes if you see three 50x50 squares and one 100x100 square.</p>

<div class="grid">
    <div class="item overflowHidden">XX<br>XX</div>
</div>

<div class="grid">
    <div class="item overflowScroll">XX<br>XX</div>
</div>

<div class="grid">
    <div class="item overflowAuto">XX<br>XX</div>
</div>

<div class="grid">
    <div class="item overflowVisible">XX<br>XX</div>
</div>