style.borders
style.borders(sides='all', color='#000000', style='solid', weight='1px')
A style specification for cell 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
Name | Type | Description | Default |
---|---|---|---|
sides |
Literal [‘all’, ‘top’, ‘bottom’, ‘left’, ‘right’] | list [Literal [‘all’, ‘top’, ‘bottom’, ‘left’, ‘right’]] | ColumnExpr |
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. |
'all' |
color |
str | ColumnExpr |
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). |
'#000000' |
style |
str | ColumnExpr |
The border style can be one of either "solid" (the default), "dashed" , "dotted" , "hidden" , or "double" . |
'solid' |
weight |
str | ColumnExpr |
The default value for weight is "1px" and higher values will become more visually prominent. |
'1px' |
Returns
Type | Description |
---|---|
CellStyleBorders | A CellStyleBorders object, which is used for a styles argument if specifying cell borders. |
Examples
See GT.tab_style()
.
Attributes
Name | Description |
---|---|
color | str(object=’’) -> str |
sides | str(object=’’) -> str |
style | str(object=’’) -> str |
weight | str(object=’’) -> str |