style.borders
A style specification for cell borders.
Usage
style.borders()The styles.borders() class is to be used with the tab_style() method, which itself allows for the setting of custom styles to one or more cells. The sides argument is where we define which borders should be modified (e.g., "left", "right", etc.). With that selection, the color, style, and weight of the selected borders can then be modified.
Parameters
sides: (
Literal["all", "top", "bottom", "left", "right"]
| list[Literal["all", "top", "bottom", "left", "right"]]
)
= "all"-
The border sides to be modified. Options include
"left","right","top", and"bottom". For all borders surrounding the selected cells, we can use the"all"option. color: str | ColumnExpr = "#000000"-
The border color can be defined with any valid CSS color value, such as a hex code, a named color, or an RGB value. The default color value is
"#000000"(black). style: str | ColumnExpr = "solid"-
The border style can be one of either
"solid"(the default),"dashed","dotted","hidden", or"double". weight: str | ColumnExpr = "1px"-
The default value for weight is
"1px"and higher values will become more visually prominent.
Returns
CellStyleBorders-
A CellStyleBorders object, which is used for a
stylesargument if specifying cell borders.
Examples
See GT.tab_style().