I am currently mocking up a layout, learning about CSS-Grid but I have come to an issue during my media query setup where depending on the query, and the layout I specify, the grid area I do not want in the template shows up after all my content in the bottom right. It's a very weird behavior.
I have tried setting it's display to none in the css but when I get to the larger screen sizes it stays hidden. As I hide more elements, the last element to not be shown is placed over-top the bottom-right area element.
Code: https://jsfiddle.net/sbf05joq/
Images: https://i.stack.imgur.com/4Rz2U.jpg
...
@media (min-width: 576px) {
.site {
...
grid-template-areas: "title" "header" "main" "footer";
.sidebar {
display: none;
}
}
}
...
@media (min-width: 992px) {
.site {
....
grid-template-areas:
"title title"
"header header"
"sidebar main"
"footer footer";
}
}