When using CSS Grid, the outer container element is not what the element is sized to. It is sized to the column/row within that element. Container queries should react to the size of the column/row of the grid, not the size of the parent element. https://www.w3.org/TR/css-contain-3/