blob: 2b891844344f2047cbf7fb42c24219ef4e227756 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid, display: contents &amp; ::before/::after</title>
<style>
.grid {
display: grid;
grid-template-columns: repeat(5, 150px);
}
.replaced {
display: contents;
}
.replaced::before {
content: "before";
}
.replaced::after {
content: "after";
}
.replaced-container {
display: contents;
}
.replaced::before, .replaced::after, span {
width: 100px;
height: 100px;
background-color: green;
}
</style>
</head>
<body>
<div class="grid">
<div class="replaced"></div>
<span>span</span>
<div class="replaced-container">
<div class="replaced"></div>
</div>
</div>
</body>
</html>