diff --git a/blocks/grid/grid.css b/blocks/grid/grid.css index 3e2378b0..d7f192a4 100644 --- a/blocks/grid/grid.css +++ b/blocks/grid/grid.css @@ -1,11 +1,12 @@ .section.grid { display: grid; - grid-template-columns: var(--grid-template-columns); - grid-template-rows: var(--grid-template-rows); + grid-template-columns: var(--grid-template-columns, unset); + grid-template-rows: var(--grid-template-rows, unset); } .section.grid .element { - grid-column: var(--grid-column-start-position, auto) var(--grid-column-end-position, auto); + grid-column: var(--grid-column-start-position, auto) / var(--grid-column-end-position, auto); + grid-row: var(--grid-row-start-position, auto) / var(--grid-row-end-position, auto); width: 100%; max-width: unset; background-color: var(--background-color, transparent); diff --git a/blocks/grid/grid.js b/blocks/grid/grid.js index dd2aea2e..fafdfefc 100644 --- a/blocks/grid/grid.js +++ b/blocks/grid/grid.js @@ -12,7 +12,7 @@ export default function decorate(block) { if (columnTemplate) { variables['grid-template-columns'] = columnTemplate; } - if (columnTemplate) { + if (rowTemplate) { variables['grid-template-rows'] = rowTemplate; } addCssVariables(block, variables);