Skip to contents

This function can be used inside s_table_style (cell-level borders) or s_paragraph (paragraph-level borders).

Usage

s_borders(top = NULL, bottom = NULL, left = NULL, right = NULL)

Arguments

top

Top border created with s_border

bottom

Bottom border created with s_border

left

Left border created with s_border

right

Right border created with s_border

Value

A borders specification object

Examples

if (FALSE) { # \dontrun{
# Cell-level borders
spec <- create_text() |>
  add_style("my_style",
    s_table_style(
      borders = s_borders(
        top = s_border(width = "1pt"),
        bottom = s_border(width = "2pt", line_style = "double")
      )
    )
  )

# Paragraph-level borders (border follows the text, not the cell edge)
spec <- create_table(mtcars) |>
  add_style("span_underline",
    s_paragraph(
      alignment = "center",
      borders = s_borders(
        bottom = s_border(color = "#4472C4", width = "1pt")
      )
    )
  )
} # }