Closed ror-y closed 7 years ago
There is a note in the specification just below that section explaining that you cannot set the gap properties with the shorthand,
"Note: Note that you can only specify the explicit or the implicit grid properties in a single grid declaration. The sub-properties you don’t specify are set to their initial value, as normal for shorthands. Also, the gutter properties are reset by this shorthand, even though they can’t be set by it."
The specification is what browsers implement, so if something is not in the spec then there isn't another way to do it.
From the documentation:
It doesn't look like you can actually change
grid-column-gap
orgrid-row-gap
using thegrid
shorthand, rather that using the rule simply initiliases each value back toinitial
.Is this the case or have you found it's possible to set a
gap
using thegrid
shorthand?