<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/assets/reset.css" rel="stylesheet">
<link href="setup.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2 <br>with line <br>breaks</p>
</li>
<li>
<p>Item 3 <br>also</p>
</li>
<li>
<p>Item 4</p>
</li>
<li>
<p>Item 5</p>
</li>
</ol>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2 <br>with line <br>breaks</p>
</li>
<li>
<p>Item 3 <br>also</p>
</li>
<li>
<p>Item 4</p>
</li>
<li>
<p>Item 5</p>
</li>
</ol>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2 <br>with line <br>breaks</p>
</li>
<li>
<p>Item 3 <br>also</p>
</li>
<li>
<p>Item 4</p>
</li>
<li>
<p>Item 5</p>
</li>
</ol>
</body>
</html>
ol { display: grid; }
ol:first-child {
grid-template-columns: repeat(auto-fill, 100px);
}
ol:nth-child(2) {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
ol:last-child {
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}