Global CSS API: Typography

The following CSS custom properties are used to control form UI typography.

Base Typography

Properties used for base form UI typography.

PropertyDescriptionDefault
--gf-font-family-baseBase font family.initial (inherit theme's font family)
--gf-font-style-baseBase font style.normal

Primary Typography

Properties used for primary typography, namely form controls and validation UI.

PropertyDescriptionDefault
--gf-font-family-primaryPrimary font family.var(--gf-font-family-base)
--gf-font-size-primaryPrimary font size.14px
--gf-font-style-primaryPrimary font style.var(--gf-font-style-base)
--gf-font-weight-primaryPrimary font weight.400
--gf-letter-spacing-primaryPrimary letter spacing.0
--gf-line-height-primaryPrimary line height.1.5

Secondary Typography

Properties used for secondary typography, namely form labels.

PropertyDescriptionDefault
--gf-font-family-secondarySecondary font family.var(--gf-font-family-base)
--gf-font-size-secondarySecondary font size.14px
--gf-font-style-secondarySecondary font style.var(--gf-font-style-base)
--gf-font-weight-secondarySecondary font weight.500
--gf-letter-spacing-secondarySecondary letter spacing.0
--gf-line-height-secondarySecondary line height.1.43

Tertiary Typography

Properties used for tertiary typography, namely form descriptions and sub-labels (labels for complex fields and fieldsets).

PropertyDescriptionDefault
--gf-font-family-tertiaryTertiary font family.var(--gf-font-family-base)
--gf-font-size-tertiaryTertiary font size.14px
--gf-font-style-tertiaryTertiary font style.var(--gf-font-style-base)
--gf-font-weight-tertiaryTertiary font weight.400
--gf-letter-spacing-tertiaryTertiary letter spacing.0
--gf-line-height-tertiaryTertiary line height.1.43