Most of the field types support the selector parameters.
{{SELECTOR}}
is replaced by the unique addon class.
data.field_key
is replaced by the value of the field.
'selector' => '{{SELECTOR}} .example-class { font-size: {{data.number_height}}; }',
'selector' => array(
'{{SELECTOR}} .example-class-1 { font-size: {{data.number_height}}; }',
'{{SELECTOR}} .example-class-2 { line-height: {{data.number_height}}; }',
)
'selector' => '{{SELECTOR}} .example-class-1 { font-size: {{data.number_height}}; }, {{SELECTOR}} .example-class-2 { line-height: {{data.number_height}}; }'
'addon_alignment' => array(
'type' => 'alignment',
'title' => __('Alignment Field','your-textdomain'),
'selector' => '{{SELECTOR}} .example-alignment{ color: {{data.addon_color}}; }',
),
'addon_color' => array(
'type' => 'color',
'title' => __('Color Field','your-textdomain'),
),
- typography
- typography2
- gradient
- border
- color2
- boxshadow
'selector' => '{{SELECTOR}} .example-class'