I am having a problem with a multi-line element inside a CSS grid. I'm not sure if this is by design or by strange behavior.
.container {
display: grid;
grid-template-columns: 65% 35%;
grid-template-rows: min-content auto;
grid-template-areas: "head side" "body side";
}
.item-head {
grid-area: head;
}
.item-body {
grid-area: body;
}
.item-side {
grid-area: side;
}
Basically, a side element spans two lines on the right side. While the head part is on the left side of the first line, so the height of the head should be minimal content, but in fact it was pushed by the contents inside the side .
Here is a demo on codepen
Here is one of the corrections I made while trying to use auto for head. auto .
, . , body .
this. 2x2, .
MDN, , min-content
, , .
, , ? 2 , , . , - , , .
Edit:
1fr body
, . , fr, , IE Edge MDN. CSS-Tricks , , .
fr firefox chrome, .
, side
2 , - 2 , - 1 . 1- 2- . , auto
, , .