Skip to content

Commit 79b11cf

Browse files
authored
1 parent f02c9c3 commit 79b11cf

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Grid: a grid with baseline self-alignment participates in its flex parent's baseline alignment (reference)</title>
4+
<link rel="stylesheet" href="/fonts/ahem.css">
5+
<style>
6+
body { margin: 0; }
7+
.flex { display: flex; align-items: baseline; font: 100px/1 Ahem; color: black; }
8+
.reference { font-size: 100px; }
9+
.item { font-size: 50px; align-self: baseline; }
10+
</style>
11+
<div class="flex">
12+
<span class="reference">X</span>
13+
<div class="item">X</div>
14+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Grid: a grid with baseline self-alignment participates in its flex parent's baseline alignment</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-align/#baseline-values">
5+
<link rel="match" href="grid-self-alignment-baseline-gfc-001-ref.html">
6+
<link rel="stylesheet" href="/fonts/ahem.css">
7+
<meta name="assert" content="A display:grid box whose resolved align-self is baseline aligns its own baseline with the baseline of its flex parent's line.">
8+
<style>
9+
body { margin: 0; }
10+
.flex { display: flex; align-items: baseline; font: 100px/1 Ahem; }
11+
.reference { font-size: 100px; }
12+
.grid {
13+
display: grid;
14+
grid-template-rows: auto;
15+
grid-template-columns: auto;
16+
align-self: baseline;
17+
font-size: 50px;
18+
}
19+
.grid > .item { grid-row: 1 / 2; }
20+
</style>
21+
<div class="flex">
22+
<span class="reference">X</span>
23+
<div class="grid"><div class="item">X</div></div>
24+
</div>

0 commit comments

Comments
 (0)