Skip to content

Type – Typography

Henner R Setyono edited this page Feb 29, 2020 · 3 revisions

'rootTypography' => [
  'label' => __( 'Root Typography' ),
  'type' => 'ct-typography',
  'isDefault' => true,
  'css' => '--root$'
],

CSS

You define only the prefix. The $ symbol will be replaced by several properties.

For example if the CSS value is --root$, it will output these:

  • --rootFontSize
  • --rootFontFamily
  • --rootFontStyle
  • --rootFontWeight
  • --rootLineHeight
  • --rootLetterSpacing
  • --rootTextDecoration
  • --rootTextTransform

Value Format

'rootTypography' => blocksy_typography_default_values([
  'family' => 'Default',
  'variation' => 'n4',
  'size' => '16px',
  'line-height' => '1.65',
  'letter-spacing' => '0',
  'text-transform' => 'none',
  'text-decoration' => 'none',
]),

That function is used to complete the missing arguments. If any.

variation

  • n = normal
  • i = italic
  • The number is font-weight (4 = 400 normal, 7 = 700 bold)

text-transform

  • uppercase
  • capitalize

text-decoration

  • underline
  • line-through

Clone this wiki locally