lightningcss
lightningcss copied to clipboard
Grid template shorthand causes unreachable code with `grid-template-areas`
Context
When using grid shorthand property together with grid-template-areas we are hitting unreachable code
Sample
.grid-broken {
display: grid;
/* */
grid: auto-flow / 1fr 2fr 1fr;
/* This will cause an error */
grid-template-areas: ". content .";
}
.grid-broken-working {
display: grid;
/* Not using shorthand syntax for grid works without the issue */
grid-auto-flow: row;
grid-template-columns: 1fr 2fr 1fr;
grid-template-areas: ". content .";
}
Error seen
lightningcss/lightningcss/src/properties/grid.rs:830:16:
| internal error: entered unreachable code
| stack backtrace: