Previously, we used media queries to set the number of columns. However, media columns are based on entire viewport width. When we start to use more of the viewport area, for example with a second sidebar for submenus, the grid columns will not be correct anymore. We can change the numbers we set in the grid columns to accomodate new remaining space, but that would break the places where there is no second sidebar. The solution is to use grid-template-columns instead of media queries, because they are based on the width of the container.
1.7 KiB
1.7 KiB