Given this CSS grid example:
ul {
display: grid;
grid-template-columns: repeat(3, 1fr);
padding: 0;
list-style: none;
}
li {
background: rgba(128, 0, 0, .5);
border: 1px solid #666;
}
.four {
grid-area: 2/1/2/4;
}
<ul>
<li>Col 1</li>
<li>Col 2</li>
<li>Col 3</li>
<li class="four">Col 4</li>
</ul>
Can anyone explain, why I do I need to set the grid-column-end to 4 if there are only three columns?
From what I understand from the MDN docs, the grid-area should be grid-area: 2/1/2/3; – but that would result in the li.four only spanning two columns.
To me this seems like a strange bug, because I need to span column 1-4 to actually have a visual span of a row over three columns.
