Skip to content

Commit

Permalink
improved gt_base
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjbe committed Nov 7, 2024
1 parent 61658f1 commit 61dd372
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions R/ojo_gt.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ gt_base <- function(data,
transform = "uppercase",
weight = "bold"),
locations = gt::cells_column_labels(tidyselect::everything())
) |>
gt::tab_style(
style = list(
gt::cell_text(weight = "bold",
size = gt::px(font_size * 2))
),
locations = gt::cells_title(groups = "title")
) |>
gt::tab_style(
style = list(
gt::cell_text(style = "italic",
color = "#333333",
size = gt::px(font_size * 1.25))
),
locations = gt::cells_title(groups = "subtitle")
)


Expand Down Expand Up @@ -111,19 +126,14 @@ gt_okpi <- function(data,
) |>
gt::tab_style(
style = list(
gt::cell_text(weight = "bold",
color = ojothemes::okpi_red,
size = gt::px(font_size * 2)),
gt::cell_text(color = ojothemes::okpi_red),
gt::css(padding.left = "10px",
border.left = paste0("10px solid ", okpi_red, ";"))
),
locations = gt::cells_title(groups = "title")
) |>
gt::tab_style(
style = list(
gt::cell_text(style = "italic",
color = "#333333",
size = gt::px(font_size * 1.25)),
gt::css(padding.left = "10px",
border.left = paste0("10px solid ", okpi_red, ";"))
),
Expand Down Expand Up @@ -170,19 +180,13 @@ gt_ojo <- function(data,
) |>
gt::tab_style(
style = list(
gt::cell_text(weight = "bold",
color = "#333333",
size = gt::px(font_size * 2)),
# I think this little splash of color is nice
gt::css(padding.left = "10px",
border.left = paste0("10px solid ", okpi_yellow, ";"))
),
locations = gt::cells_title(groups = "title")
) |>
gt::tab_style(
style = list(
gt::cell_text(style = "italic",
size = gt::px(font_size * 1.25)),
gt::css(padding.left = "10px",
border.left = paste0("10px solid ", okpi_yellow, ";"))
),
Expand Down

0 comments on commit 61dd372

Please sign in to comment.