Skip to contents

This function can only be used inside add_style.

Usage

s_table_style(
  background_color = NULL,
  row_height = NULL,
  topEmptyLine = NULL,
  bottomEmptyLine = NULL,
  vertical_alignment = NULL,
  text_orientation = NULL,
  borders = NULL
)

Arguments

background_color

Cell background color as hex code or color name

row_height

Row height, e.g. "15mm" or "auto"

topEmptyLine

Empty spacer row height after header, e.g. "6pt"; NULL disables it

bottomEmptyLine

Empty spacer row height before bottom border, e.g. "6pt"; NULL disables it

vertical_alignment

Vertical alignment: "top", "center", "bottom"

text_orientation

Text orientation: "horizontal", "vertical_90", "vertical_270"

borders

Borders object created with s_borders

Value

A table style specification object

See also

add_style() for applying styles, s_borders(), s_border() for border components, s_font(), s_paragraph() for other style components

Examples

if (FALSE) { # \dontrun{
spec <- create_text() |>
  add_style("header_style",
    s_table_style(
      background_color = "#D9D9D9",
      vertical_alignment = "center",
      borders = s_borders(
        bottom = s_border(color = "#000000", width = "2pt")
      )
    )
  )
} # }