Base Category Keys

base

The keys in the base category provide generic theme settings and are often referenced throughout the theme file as variables. You can think of this category as roughly analogous to the body selector in CSS. We recommended that you define this category after the page category and before all other categories.

While it’s common to define additional keys in this category (e.g., base-border-radius) to keep your theme DRY, we recommend using custom variables instead.
Key Value Type Example

border-color

Color
(default: 'EEEEEE')

base:
  border-color: #F0FFF0

border-width

Measurement
(default: 0.5)

base:
  border-width: 0.6

font-color

Color
(default: '000000')

base:
  font-color: #333333

font-family

Font family name
(default: Helvetica)

base:
  font-family: Noto Serif

font-kerning

none | normal
(default: normal)

base:
  font-kerning: none

font-size

Number
(default: 12)

base:
  font-size: 10.5

font-size-min

Number
(default: 6)

base:
  font-size-min: $base-font-size * 0.75

font-style

Font style
(default: normal)

base:
  font-style: bold

hyphens

Boolean | Language code
(default: not set)

base:
  hyphens: true

line-height

Number
(default: 1.15)

base:
  line-height: >
    $base-line-height-length /
    $base-font-size

line-height-length

Number
(default: not set)

base:
  line-height-length: 12

text-align

Text alignment
(default: left)

base:
  text-align: center

text-decoration

Text decoration
(default: none)

base:
  text-decoration: underline

text-decoration-color

Color
(default: $base-font-color)

base:
  text-decoration-color: #0000FF

text-decoration-width

Measurement
(default: 1)

base:
  text-decoration-width: 0.5

text-transform

Implicitly set to none on base.

Can’t be set on base.

line-height and line-height-length

Refer to the line-height section to learn how to use the line-height key.

The line-height-length key is a utility property that’s internal to the theme. It’s used as an intermediate property for computing the base-line-height from the base font size and the desired line height size. For instance, if you set base-line-height-length, you can use $base-line-height-length / $base-font-size to set the value of base-line-height. You don’t have to go about it this way in your own theme.

text-align

The default text alignment can be set globally using the text-align key on the base category. While the base theme applies the value left, the default theme applies the value justify. If you don’t prefer text justification, you can change this behavior by setting this key to left. It’s also possible to set the default text alignment using the text-align document attribute.

text-transform

The text-transform key can’t be set globally. Therefore, this key shouldn’t be used on the base category. The value of none is implicit and is only documented in the table above for completeness.