|
1 | 1 | {* Generates inline spacing styles for blocks and repeater states *}
|
2 | 2 | {capture name='spacing_styles'}
|
3 | 3 | {if isset($spacing) && $spacing}
|
4 |
| - {assign var='spacingMap' value=[ |
| 4 | + {assign var='spacingMap' value=array( |
5 | 5 | 'padding_left' => 'padding-left',
|
6 | 6 | 'padding_right' => 'padding-right',
|
7 | 7 | 'padding_top' => 'padding-top',
|
8 | 8 | 'padding_bottom' => 'padding-bottom',
|
9 | 9 | 'margin_left' => 'margin-left',
|
10 | 10 | 'margin_right' => 'margin-right',
|
11 | 11 | 'margin_top' => 'margin-top',
|
12 |
| - 'margin_bottom' => 'margin-bottom', |
13 |
| - ]} |
| 12 | + 'margin_bottom' => 'margin-bottom' |
| 13 | + )} |
14 | 14 | {foreach from=$spacingMap key=spacingKey item=cssProperty}
|
15 | 15 | {if isset($spacing[$spacingKey]) && $spacing[$spacingKey]}
|
16 | 16 | {$cssProperty}:{$spacing[$spacingKey]|escape:'htmlall':'UTF-8'};
|
17 | 17 | {/if}
|
18 | 18 | {/foreach}
|
19 |
| - {assign var='mobileSpacingMap' value=[ |
| 19 | + {assign var='mobileSpacingMap' value=array( |
20 | 20 | 'margin_left_mobile' => '--margin-left-mobile',
|
21 | 21 | 'margin_right_mobile' => '--margin-right-mobile',
|
22 | 22 | 'margin_top_mobile' => '--margin-top-mobile',
|
23 |
| - 'margin_bottom_mobile' => '--margin-bottom-mobile', |
24 |
| - ]} |
| 23 | + 'margin_bottom_mobile' => '--margin-bottom-mobile' |
| 24 | + )} |
25 | 25 | {foreach from=$mobileSpacingMap key=spacingKey item=cssProperty}
|
26 | 26 | {if isset($spacing[$spacingKey]) && $spacing[$spacingKey]}
|
27 | 27 | {$cssProperty}:{$spacing[$spacingKey]|escape:'htmlall':'UTF-8'};
|
|
0 commit comments