Table Category Keys

table

The keys in the table category control the arrangement and style of tables and their cells.

Key Value Type Example

align

Block alignment
(default: left)

table:
  align: right
yaml

background-color

Color
(default: transparent)

table:
  background-color: #FFFFFF
yaml

border-color

Color | Color[]
(default: '000000')

table:
  border-color: #DDDDDD
yaml

border-style

Border style | Border style[]
(default: solid)

table:
  border-style: [solid, ~, solid, dotted]
yaml

border-width

Measurement | Measurement[]
(default: 0.5)

table:
  border-width: 0.5
yaml

font-color

Color
(default: inherit)

table:
  font-color: #333333
yaml

font-family

Font family name
(default: inherit)

table:
  font-family: Helvetica
yaml

font-kerning

none | normal
(default: inherit)

table:
  font-kerning: none
yaml

font-size

Number
(default: inherit)

table:
  font-size: 9.5
yaml

font-style

Font style
(default: inherit)

table:
  font-style: italic
yaml

grid-color

Color | Color[]
(default: $table-border-color)

table:
  grid-color: #EEEEEE
yaml

grid-style

Grid style | Grid style[]
(default: $table-border-style)

table:
  grid-style: dashed
yaml

grid-width

Measurement | Measurement[]
(default: $table-border-width)

table:
  grid-width: 1
yaml

The keys in the table-head category control the arrangement and style of the table header. See table-header-cell for the theme keys that apply to individual header cells.

Key Value Type Example

background-color

Color
(default: $table-background-color)

table:
  head:
    background-color: #F0F0F0
yaml

border-bottom-color

Color
(default: $table-border-color)

table:
  head:
    border-bottom-color: #DDDDDD
yaml

border-bottom-style

Border style
(default: solid)

table:
  head:
    border-bottom-style: dashed
yaml

border-bottom-width

Measurement
(default: 1.25)

table:
  head:
    border-bottom-width: 1
yaml

cell-padding

Measurement | Measurement[]
(default: $table-cell-padding)

table:
  head:
    cell-padding: [4, 2]
yaml

font-color

Color
(default: $table-font-color)

table:
  head:
    font-color: #333333
yaml

font-family

Font family name
(default: $table-font-family)

table:
  head:
    font-family: Noto Serif
yaml

font-kerning

none | normal
(default: inherit)

table:
  head:
    font-kerning: none
yaml

font-size

Number
(default: $table-font-size)

table:
  head:
    font-size: 10
yaml

font-style

Font style
(default: bold)

table:
  head:
    font-style: normal
yaml

line-height

Number
(default: inherit)

table:
  head:
    line-height: 1.15
yaml

text-transform

Text transform
(default: inherit)

table:
  head:
    text-transform: uppercase
yaml

table-body

The keys in the table-body category control the background of the table body.

Key Value Type Example

background-color

Color
(default: $table-background-color)

table:
  body:
    background-color: #FDFDFD
yaml

stripe-background-color

Color
(default: 'EEEEEE')

table:
  body:
    stripe-background-color: #EFEFEF
yaml

The keys in the table-foot category control the arrangement and style of the table footer.

Key Value Type Example

background-color

Color
(default: $table-background-color)

table:
  foot:
    background-color: #F0F0F0
yaml

font-color

Color
(default: $table-font-color)

table:
  foot:
    font-color: #333333
yaml

font-family

Font family name
(default: $table-font-family)

table:
  foot:
    font-family: Noto Serif
yaml

font-size

Number
(default: $table-font-size)

table:
  foot:
    font-size: 10
yaml

font-style

Font style
(default: $table-font-style)

table:
  foot:
    font-style: italic
yaml

table-cell

The keys in the table-cell category control the arrangement and style of table cells.

Key Value Type Example

line-height

Number
(default: inherit)

table:
  cell:
    line-height: 1.5
yaml

padding

Measurement | Measurement[]
(default: 2)

table:
  cell:
    padding: 3
yaml

table-asciidoc-cell

The key in the table-asciidoc-cell category controls the style of AsciiDoc table cells.

Key Value Type Example

style

inherit | initial (default: inherit)

table:
  asciidoc-cell:
    style: initial
yaml

The keys in the table-header-cell category control the style and arrangement of header cells. See table-head for the theme keys that apply to the table header row.

Key Value Type Example

background-color

Color
(default: $table-head-background-color)

table:
  header-cell:
    background-color: #F0F0F0
yaml

font-color

Color
(default: $table-head-font-color)

table:
  header-cell:
    font-color: #1A1A1A
yaml

font-family

Font family name
(default: $table-head-font-family)

table:
  header-cell:
    font-family: Noto Sans
yaml

font-size

Number
(default: $table-head-font-size)

table:
  header-cell:
    font-size: 12
yaml

font-style

Font style
(default: $table-head-font-style)

table:
  header-cell:
    font-style: italic
yaml

text-transform

Text transform
(default: $table-head-text-transform)

table:
  header-cell:
    text-transform: uppercase
yaml

table-caption

The keys in the table-caption category control the style and arrangement of the table captions. The keys listed on Caption Category Keys can also be nested under the table-caption category to further customize the table captions.

Key Value Type Example

caption-align

Block alignment | inherit
(default: $caption-align)

table:
  caption:
    align: center
yaml

caption-end

End placement
(default: top)

table:
  caption:
    end: bottom
yaml

caption-max-width

fit-content | fit-content(percentage) | none | Measurement
(default: fit-content)

table:
  caption:
    max-width: none
yaml

caption-text-align

Text alignment | inherit
(default: $table-caption-align)

table:
  caption:
    text-align: center
yaml

For more information about styling tables using the theming language, see Table Styles.