The typography control provides the following CSS properties:
- font-family
- font-weight
- text-align
- text-transform
- font-size
- line-height
- letter-spacing
- color
- text-shadow
Use the exclude
parameter to hide specific typography properties. Set popup
to false to show control inline.
class Prefix_Element_Typography extends BricksElement { // Set builder controls public function set_controls() { $this->controls['exampleTypography'] = [ 'tab' => 'content', 'label' => esc_html__( 'Typography', 'bricks' ), 'type' => 'typography', 'css' => [ [ 'property' => 'typography', 'selector' => '.prefix-typography', ], ], 'inline' => true, // 'exclude' => [ // 'font-family', // 'font-weight', // 'text-align', // 'text-transform', // 'font-size', // 'line-height', // 'letter-spacing', // 'color', // 'text-shadow', // ], // 'popup' => false, // Default: true ]; } // Render element HTML public function render() { echo '<h3 class="prefix-typography">' . get_bloginfo( 'name' ) . '</h3>'; } }