grid-area prefixing missing when used with grid-template with grid area definitions
I played around with the grid-template shorthand syntax today and discovered, that is seems only to be only partially implemented:
As per i. e. https://developer.mozilla.org/de/docs/Web/CSS/grid-template, use can use the following values for grid-template:
a) grid-template-rows / grid-template-columns values b) grid-template-areas grid-template-rows / grid-template-column values
a) seems to be working correctly.
grid-template: 1fr 1fr / auto
is transformed to
-ms-grid-rows: 1fr 1fr;
-ms-grid-columns: auto;
But b) seems not to be implemented. See example below:
SCSS input:
.box {
display: grid;
grid-template: "a b" auto / 1fr 1fr;
#a {
grid-area: a;
}
#b {
grid-area: b;
}
}
CSS output: Notice: -ms-grid-row and -ms-grid-column props are missing for #b.
.box {
display: -ms-grid;
display: grid;
grid-template: "a b" auto / 1fr 1fr;
}
.box #a {
grid-area: a;
}
.box #b {
grid-area: b;
}
Would be very nice if you guys could also implement this use case.
Wow, never thought about this syntax. Yeap, we support only areas in grid-template right now.
@evgeny-petukhov do you want next awesome challenge? :D grid-template syntax is more tricky than just area. It could combine different properties. But seems like without rocket science. Just parse it and use old logic.
@derzwen as a temporary solution you can ignore shortcut and use long properties for the same result.
Thanks! I'm just playing around with CSS Grids right now. I appreciate your CSS Grid support a lot and want to help to make it more robust/complete. So more issues might follow ;)
@ai I'm ready for the challenge :) Definitely, we can fully implement grid-template syntax. I'll do it during this week.
Done here #992
PR was accepted
Released in 8.1