Skip to content

Commit

Permalink
Merge branch 'master' into useful-error-msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Jun 21, 2021
2 parents 5eb6333 + 1dd9356 commit 1a0a5fa
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 16 deletions.
2 changes: 2 additions & 0 deletions R/dt_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ dt_options_tbl <-
"heading_title_font_weight", TRUE, "heading", "value", "initial",
"heading_subtitle_font_size", TRUE, "heading", "px", "85%",
"heading_subtitle_font_weight", TRUE, "heading", "value", "initial",
"heading_padding", TRUE, "heading", "px", "4px",
"heading_border_bottom_style", TRUE, "heading", "value", "solid",
"heading_border_bottom_width", TRUE, "heading", "px", "2px",
"heading_border_bottom_color", TRUE, "heading", "value", "#D3D3D3",
Expand All @@ -93,6 +94,7 @@ dt_options_tbl <-
"column_labels_font_size", TRUE, "column_labels", "px", "100%",
"column_labels_font_weight", TRUE, "column_labels", "value", "normal",
"column_labels_text_transform", TRUE, "column_labels", "value", "inherit",
"column_labels_padding", TRUE, "column_labels", "px", "5px",
"column_labels_vlines_style", TRUE, "table_body", "value", "none",
"column_labels_vlines_width", TRUE, "table_body", "px", "1px",
"column_labels_vlines_color", TRUE, "table_body", "value", "#D3D3D3",
Expand Down
13 changes: 9 additions & 4 deletions R/tab_create_modify.R
Original file line number Diff line number Diff line change
Expand Up @@ -1486,10 +1486,13 @@ set_style.cells_source_notes <- function(loc, data, style) {
#' Options to apply text transformations to the `column_labels`, `row_group`,
#' `stub`, `summary_row`, and `grand_summary_row` text elements. Either of the
#' `"uppercase"`, `"lowercase"`, or `"capitalize"` keywords can be used.
#' @param data_row.padding,row_group.padding,summary_row.padding,grand_summary_row.padding,footnotes.padding,source_notes.padding
#' The amount of vertical padding to incorporate in the `data_row`,
#' `row_group`, `summary_row`, `grand_summary_row`, `footnotes`, and
#' `source_notes` locations.
#' @param heading.padding,column_labels.padding,data_row.padding,row_group.padding,summary_row.padding,grand_summary_row.padding,footnotes.padding,source_notes.padding
#' The amount of vertical padding to incorporate in the `heading` (title and
#' subtitle), the `column_labels` (this includes the column spanners), the row
#' group labels (`row_group.padding`), in the body/stub rows
#' (`data_row.padding`), in summary rows (`summary_row.padding` or
#' `grand_summary_row.padding`), or in the footnotes and source notes
#' (`footnotes.padding` and `source_notes.padding`).
#' @param table.border.top.style,table.border.top.width,table.border.top.color,table.border.right.style,table.border.right.width,table.border.right.color,table.border.bottom.style,table.border.bottom.width,table.border.bottom.color,table.border.left.style,table.border.left.width,table.border.left.color
#' The style, width, and color properties of the table's absolute top and
#' absolute bottom borders.
Expand Down Expand Up @@ -1711,6 +1714,7 @@ tab_options <- function(data,
heading.title.font.weight = NULL,
heading.subtitle.font.size = NULL,
heading.subtitle.font.weight = NULL,
heading.padding = NULL,
heading.border.bottom.style = NULL,
heading.border.bottom.width = NULL,
heading.border.bottom.color = NULL,
Expand All @@ -1721,6 +1725,7 @@ tab_options <- function(data,
column_labels.font.size = NULL,
column_labels.font.weight = NULL,
column_labels.text_transform = NULL,
column_labels.padding = NULL,
column_labels.vlines.style = NULL,
column_labels.vlines.width = NULL,
column_labels.vlines.color = NULL,
Expand Down
14 changes: 7 additions & 7 deletions inst/css/gt_styles_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
color: font-color($heading_background_color);
font-size: $heading_title_font_size; // heading.title.font.size
font-weight: $heading_title_font_weight; // heading.title.font.weight
padding-top: 4px; // heading.top.padding - not yet used
padding-bottom: 4px;
padding-top: $heading_padding; // heading.padding
padding-bottom: $heading_padding; //heading.padding
border-bottom-color: $table_background_color; // table.background.color
border-bottom-width: 0;
}
Expand All @@ -52,7 +52,7 @@
font-size: $heading_subtitle_font_size; // heading.subtitle.font.size
font-weight: $heading_subtitle_font_weight; // heading.subtitle.font.weight
padding-top: 0;
padding-bottom: 4px; // heading.bottom.padding - not yet used
padding-bottom: $heading_padding + 2; // heading.padding
border-top-color: $table_background_color; // table.background.color
border-top-width: 0;
}
Expand Down Expand Up @@ -91,8 +91,8 @@
border-right-width: $column_labels_vlines_width; // column_labels.vlines.width
border-right-color: $column_labels_vlines_color; // column_labels.vlines.color
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-top: $column_labels_padding; // column_labels.padding
padding-bottom: $column_labels_padding + 1; // column_labels.padding
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
Expand Down Expand Up @@ -121,8 +121,8 @@
border-bottom-width: $column_labels_border_bottom_width; // column_labels.border.bottom.width
border-bottom-color: $column_labels_border_bottom_color; // column_labels.border.bottom.color
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-top: $column_labels_padding; // column_labels.padding
padding-bottom: $column_labels_padding; // column_labels.padding
overflow-x: hidden;
display: inline-block;
width: 100%;
Expand Down
13 changes: 9 additions & 4 deletions man/tab_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1a0a5fa

Please sign in to comment.