Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>
CSS Gap Decorations: setting *rule-break to intersection stops painting decorations at each intersection.
</title>
<link rel="match" href="grid-gap-decorations-007-ref.html">
<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
<style>
body {
margin: 0px;
}
.grid-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
width: 430px;
height: 430px;
column-rule-color: blue;
column-rule-style: solid;
column-rule-width: 5px;
row-rule-color: red;
row-rule-style: solid;
row-rule-width: 5px;
column-rule-break: intersection;
column-rule-outset: 0px;
row-rule-break: intersection;
row-rule-outset: 0px;
}
.grid-item {
background-color: gray;
opacity: 0.5;
border: 1px solid #000;
}
</style>
<div class="grid-container">
<div class="grid-item" style="grid-column: 1 / 3; grid-row: 1 / 2;"></div>
<div class="grid-item" style="grid-column: 3 / 4; grid-row: 1 / 3;"></div>
<div class="grid-item" style="grid-row: 2 / 4;"></div>
<div class="grid-item" style="grid-column: 2 / 4; grid-row: 3 / 4;"></div>
<div class="grid-item" style="grid-column: 2 / 3; grid-row: 2 / 3;"></div>
<div class="grid-item" style="grid-column: 4 / 5; grid-row: 1 / 4;"></div>
<div class="grid-item" style="grid-column: 1 / 4; grid-row: 4 / 5;"></div>
<div class="grid-item" style="grid-column: 4 / 5; grid-row: 4 / 5;"></div>
</div>