I did simple grid but it is looks like styles is applying but grid is not working correct. All grid items have wrong width and height but css is applied. Stackblitz Why is that? How to fix that?
app.component.html
<header>Header</header>
<nav>Nav</nav>
<main>
<section>Intro</section>
<article>Cake</article>
<article>Cake</article>
<article>Cake</article>
</main>
<aside>Aside</aside>
<footer>Footer</footer>
app.component.css
.grid-item,
header,
main,
nav,
aside,
footer{
background: #044BD9;
color: white;
border: 1px solid #377EFF;
}
header{
grid-column-start: 1;
grid-column-end: 4;
}
footer{
grid-column-start: 1;
grid-column-end: 4;
}
styles.css
*{
font-family: Arial, Helvetica, sans-serif;
font-weight: 600;
box-sizing: border-box;
}
html,body{
background: #07038C ;
margin: 0;
height: 100%;
}
body{
display: grid;
grid-template-columns: 15em auto 15em;
grid-template-rows: min-content auto min-content;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…