@@ -44,18 +44,20 @@ Use the Empty Layout setting to determine if authors can clear out the layouts t
4444
4545The following data can be retrieved in your Twig- or GraphQL-based templates:
4646
47- | Property | Description |
48- | ---| ---|
49- | ** empty** | Determine if field has a value. |
50- | ** gridColumnStart** | Value for CSS Grid’s ` grid-column-start ` and ` grid-column ` properties. |
51- | ** gridColumnEnd** | Value for CSS Grid’s ` grid-column-end ` and ` grid-column ` properties. |
52- | ** gridRowStart** | Value for CSS Grid’s ` grid-row-start ` and ` grid-row ` properties. |
53- | ** gridRowEnd** | Value for CSS Grid’s ` grid-row-end ` and ` grid-row ` properties. |
54- | ** gridColumnSpan** | Value for CSS Grid’s ` grid-column ` property. |
55- | ** gridRowSpan** | Value for CSS Grid’s ` grid-row ` property. |
56- | ** selectedColumns** | Array of columns selected in the layout field. |
57- | ** selectedRows** | Array of rows selected in the layout field. |
58- | ** selectedCoordinates** | Array of coordinates* selected in the layout field. |
47+ | Property | Description |
48+ | -------------------------| ------------------------------------------------------------------------|
49+ | ** empty** | Determine if field has a value. |
50+ | ** gridColumnStart** | Value for CSS Grid’s ` grid-column-start ` and ` grid-column ` properties. |
51+ | ** gridColumnEnd** | Value for CSS Grid’s ` grid-column-end ` and ` grid-column ` properties. |
52+ | ** gridRowStart** | Value for CSS Grid’s ` grid-row-start ` and ` grid-row ` properties. |
53+ | ** gridRowEnd** | Value for CSS Grid’s ` grid-row-end ` and ` grid-row ` properties. |
54+ | ** gridColumnSpan** | Value for CSS Grid’s ` grid-column ` property. |
55+ | ** gridRowSpan** | Value for CSS Grid’s ` grid-row ` property. |
56+ | ** selectedColumns** | Array of columns selected in the layout field. |
57+ | ** selectedRows** | Array of rows selected in the layout field. |
58+ | ** selectedCoordinates** | Array of coordinates* selected in the layout field. |
59+ | ** totalColumns** | The columns setting for this field. |
60+ | ** totalRows** | The rows setting for this field. |
5961
6062_ * Coordinates are formatted in ` 'x|y' ` format._
6163
@@ -105,7 +107,7 @@ With CSS that looks like this:
105107If you use a CSS framework, like Tailwind CSS, you could do something like this:
106108
107109``` twig
108- <div class="col-start-{{ element.fieldHandle.gridColumnStart }} col-span-{{ element.fieldHandle.gridColumnSpan }} row-start-{{ element.fieldHandle.gridRowStart }} row-span-{{ element.fieldHandle.gridRowSpan }}"></div>
110+ <div class="col-start-[ {{ element.fieldHandle.gridColumnStart }}] col-span-[ {{ element.fieldHandle.gridColumnSpan }}] row-start-[ {{ element.fieldHandle.gridRowStart }}] row-span-[ {{ element.fieldHandle.gridRowSpan }}] "></div>
109111```
110112
111113If your Twig template files are included in your Tailwind confguration’s ` content ` patterns, you may prefer to preserve full class names using logic and a lookup table:
0 commit comments