<# var defaults = { font_family: 'Default', font_weight: 'default', font_size: { length: '', unit: 'px', }, line_height: { length: '', unit: '', }, text_align: '', letter_spacing: { length: '', unit: 'px', }, text_transform: '', text_decoration: '', font_style: '', font_variant: '', text_shadow: { color: '', horizontal: '', vertical: '', blur: '', }, }; var value = '' === data.value ? defaults : jQuery.extend( true, defaults, data.value ); var device = data.device ? data.device : 'default'; var fontFamily = wp.template( 'fl-builder-field-font' )( { names: { family: data.name + '[][font_family]', weight: data.name + '[][font_weight]', }, value: { family: value.font_family, weight: value.font_weight, }, field: { show_labels: true, }, } ); var fontSize = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][font_size][length]', value: value.font_size.length, unit_name: data.name + '[][font_size][unit]', unit_value: value.font_size.unit, field: { units: [ 'px', 'em', 'rem' ], slider: true, }, } ); var lineHeight = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][line_height][length]', value: value.line_height.length, unit_name: data.name + '[][line_height][unit]', unit_value: value.line_height.unit, field: { units: [ '', 'px', 'em' ], slider: true, }, } ); var textAlign = wp.template( 'fl-builder-field-align' )( { name: data.name + '[][text_align]', value: value.text_align, field: {}, } ); var letterSpacing = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][letter_spacing][length]', value: value.letter_spacing.length, unit_name: data.name + '[][letter_spacing][unit]', unit_value: value.letter_spacing.unit, field: { units: [ 'px' ], slider: { min: -10, max: 10, step: .1, }, }, } ); var textTransform = wp.template( 'fl-builder-field-button-group' )( { name: data.name + '[][text_transform]', value: value.text_transform, field: { options: { none: 'Normal', capitalize: 'Tt', uppercase: 'TT', lowercase: 'tt', }, }, } ); var textDecoration = wp.template( 'fl-builder-field-select' )( { name: data.name + '[][text_decoration]', value: value.text_decoration, field: { options: { '': '