I've created a typical layout using CSS Grid with this structure:
<div class="dashboard">
<header></header>
<nav></nav>
<div class="main-header"></div>
<div class="main-content"></div>
<div class="main-footer"></div>
</div>
Now, due to our environment (PHP, Smarty Templates, AngularJS), I would like to split these up into separate components. But here is the issue… I can't wrap an element around grid elements without breaking the layout:
<div class="dashboard">
<header></header> <!-- component -->
<nav></nav> <!-- component -->
<div class="wrapper"> <!-- component -->
<div class="main-header"></div>
<div class="main-content"></div>
<div class="main-footer"></div>
</div>
</div>
I've experimented with nesting another grid inside of 'wrapper', but that introduces more layout issues, such as improper scrolling. (…and nesting grids doesn't sound like a good idea).
I am wondering if there is some CSS to "pass through" the 'wrapper' div to maintain the css grid properties?
Or is there another way to handle this situation?
Thanks!