Skip to content

Commit

Permalink
Update index.qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Oct 9, 2024
1 parent 23d4ddf commit 683e91c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/blog/introduction-0.13.0/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ Though the order of things matters when setting styles via `tab_style()`, it's n

### How `tab_style()` fits in with `tab_options()`

When it comes to styling, you can use `tab_options()` for some of the basics and use `tab_style()` for the more demanding styling tasks. And you could combine the usage of both in your table. The precedence (or priority) is given to `tab_style()`, regardless of the order of invocation. As an example of this, we can add a background color to all remaining locations with `tab_options(table_background_color=...)`:
When it comes to styling, you can use `tab_options()` for some of the basics and use `tab_style()` for the more demanding styling tasks. And you could combine the usage of both in your table. Let's use `tab_options()` here:

```{python}
gt_tbl = gt_tbl.tab_options(table_background_color="HoneyDew")
gt_tbl
```

Even though `tab_options()` was invoked after the many `tab_style()` invocations, the 'HoneyDew' background color was only applied to the body cells that didn't have a background color.
In the example, we asked for the HoneyDew background fill on the entire table with `tab_options()`. However, even though `tab_options()` was used after those `tab_style()` invocations, the 'HoneyDew' background color was only applied to the locations that didn't have a background color set through `tab_style(). The important takeaway here is that the precedence (or priority) is *always* given to `tab_style()`, regardless of the order of invocation.

### Wrapping up

Expand Down

0 comments on commit 683e91c

Please sign in to comment.