Skip to content

Commit 3d577e8

Browse files
Raise error if incorrect number of gutter params
1 parent b28b557 commit 3d577e8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

layouts/partials/_elements/grid.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
{{- $gSm := $gXs -}}
2020
{{- $gMd := $gXs -}}
2121
{{- $gLg := $gXs -}}
22-
{{- if gt (len $gutterParts) 1 -}}
22+
{{- if and (gt (len $gutterParts) 1) (ne (len $gutterParts) 4) -}}
23+
{{- errorf "grid gutter must be either 1 or 4 values (but got %d): %q" (len $gutterParts) $gutter -}}
24+
{{- else if eq (len $gutterParts) 4 -}}
2325
{{- $gSm = index $gutterParts 1 -}}
2426
{{- $gMd = index $gutterParts 2 -}}
2527
{{- $gLg = index $gutterParts 3 -}}

0 commit comments

Comments
 (0)