I created a grid template and wanted to make the first row optional (area: "t").
If it's hidden, the auto row should fill the remaining height. I tried it with minmax() css function but it doesn't work.
grid-template:
"t t t t" minmax(0px, 40px)
"h h h h" 40px
"s l m r" auto
"s f f f" 57px / 200px 100px auto 100px;
Here is a fiddle link: https://jsfiddle.net/nzaj8102/
I managed to get it working by creating two template classes. I was wondering, if I can do it differently ?
.template-with-top{
grid-template:
"t t t t" 40px
"h h h h" 40px
"s l m r" auto
"s f f f" 57px / 200px 100px auto 100px;
}
.template-without-top{
grid-template:
"h h h h" 40px
"s l m r" auto
"s f f f" 57px / 200px 100px auto 100px;
}
.template-without-top > div:nth-child(1) {
display:none
}
Here is the fiddle link: https://jsfiddle.net/hveu5bfc/
THX!