Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of the tab_options() function #288

Merged
merged 14 commits into from
Jul 11, 2019
144 changes: 72 additions & 72 deletions R/gt_options_default.R
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
gt_options_default <- function() {

dplyr::tribble(
~parameter, ~scss, ~category, ~value,
"container_width", FALSE, "container", "auto",
"container_height", FALSE, "container", "auto",
"container_overflow_x", FALSE, "container", "auto",
"container_overflow_y", FALSE, "container", "auto",
"table_id", FALSE, "table", NA_character_,
"table_width", TRUE, "table", "auto",
"table_font_size", TRUE, "table", "16px",
"table_background_color", TRUE, "table", "#FFFFFF",
"margin_left", TRUE, "table", "auto",
"margin_right", TRUE, "table", "auto",
"table_border_top_style", TRUE, "table", "solid",
"table_border_top_width", TRUE, "table", "2px",
"table_border_top_color", TRUE, "table", "#A8A8A8",
"table_border_bottom_style", TRUE, "table", "solid",
"table_border_bottom_width", TRUE, "table", "2px",
"table_border_bottom_color", TRUE, "table", "#A8A8A8",
"heading_background_color", TRUE, "heading", NA_character_,
"heading_title_font_size", TRUE, "heading", "125%",
"heading_subtitle_font_size", TRUE, "heading", "85%",
"heading_border_bottom_style", TRUE, "heading", "solid",
"heading_border_bottom_width", TRUE, "heading", "2px",
"heading_border_bottom_color", TRUE, "heading", "#A8A8A8",
"column_labels_background_color", TRUE, "columns", NA_character_,
"column_labels_font_size", TRUE, "columns", "16px",
"column_labels_font_weight", TRUE, "columns", "initial",
"column_labels_hidden", FALSE, "columns", "FALSE",
"columns_border_top_style", TRUE, "columns", "solid",
"columns_border_top_width", TRUE, "columns", "2px",
"columns_border_top_color", TRUE, "columns", "#A8A8A8",
"columns_border_bottom_style", TRUE, "columns", "solid",
"columns_border_bottom_width", TRUE, "columns", "2px",
"columns_border_bottom_color", TRUE, "columns", "#A8A8A8",
"row_group_background_color", TRUE, "row_group", NA_character_,
"row_group_font_size", TRUE, "row_group", "16px",
"row_group_font_weight", TRUE, "row_group", "initial",
"row_group_border_top_style", TRUE, "row_group", "solid",
"row_group_border_top_width", TRUE, "row_group", "2px",
"row_group_border_top_color", TRUE, "row_group", "#A8A8A8",
"row_group_border_bottom_style", TRUE, "row_group", "solid",
"row_group_border_bottom_width", TRUE, "row_group", "2px",
"row_group_border_bottom_color", TRUE, "row_group", "#A8A8A8",
"table_body_border_top_style", TRUE, "table_body", "solid",
"table_body_border_top_width", TRUE, "table_body", "2px",
"table_body_border_top_color", TRUE, "table_body", "#A8A8A8",
"table_body_border_bottom_style", TRUE, "table_body", "solid",
"table_body_border_bottom_width", TRUE, "table_body", "2px",
"table_body_border_bottom_color", TRUE, "table_body", "#A8A8A8",
"row_padding", TRUE, "row", "8px",
"row_striping_include_stub", FALSE, "row", "FALSE",
"row_striping_include_table_body", FALSE, "row", "TRUE",
"summary_row_background_color", TRUE, "summary_row", NA_character_,
"summary_row_padding", TRUE, "summary_row", "8px",
"summary_row_text_transform", TRUE, "summary_row", "inherit",
"grand_summary_row_background_color", TRUE, "grand_summary_row", NA_character_,
"grand_summary_row_padding", TRUE, "grand_summary_row", "8px",
"grand_summary_row_text_transform", TRUE, "grand_summary_row", "inherit",
"footnote_sep", FALSE, "footnote", "<br />",
"footnote_glyph", FALSE, "footnote", "numbers",
"footnotes_border_top_style", TRUE, "table", "solid",
"footnotes_border_top_width", TRUE, "table", "2px",
"footnotes_border_top_color", TRUE, "table", "#A8A8A8",
"footnote_font_size", TRUE, "footnote", "90%",
"footnote_padding", TRUE, "footnote", "4px",
"footnote_margin", TRUE, "footnote", "0px",
"sourcenotes_border_top_style", TRUE, "table", "solid",
"sourcenotes_border_top_width", TRUE, "table", "2px",
"sourcenotes_border_top_color", TRUE, "table", "#A8A8A8",
"sourcenote_font_size", TRUE, "sourcenote", "90%",
"sourcenote_padding", TRUE, "sourcenote", "4px",
) %>%
as.data.frame()
~parameter, ~scss, ~category, ~type, ~value,
"empty", FALSE, "empty", "value", list(),
"container_width", FALSE, "container", "px", "auto",
"container_height", FALSE, "container", "px", "auto",
"container_overflow_x", FALSE, "container", "overflow", "auto",
"container_overflow_y", FALSE, "container", "overflow", "auto",
"table_id", FALSE, "table", "value", NA_character_,
"table_width", TRUE, "table", "px", "auto",
"table_font_size", TRUE, "table", "px", "16px",
"table_background_color", TRUE, "table", "value", "#FFFFFF",
"table_margin_left", TRUE, "table", "px", "auto",
"table_margin_right", TRUE, "table", "px", "auto",
"table_border_top_style", TRUE, "table", "value", "solid",
"table_border_top_width", TRUE, "table", "px", "2px",
"table_border_top_color", TRUE, "table", "value", "#A8A8A8",
"table_border_bottom_style", TRUE, "table", "value", "solid",
"table_border_bottom_width", TRUE, "table", "px", "2px",
"table_border_bottom_color", TRUE, "table", "value", "#A8A8A8",
"heading_background_color", TRUE, "heading", "value", NA_character_,
"heading_title_font_size", TRUE, "heading", "px", "125%",
"heading_subtitle_font_size", TRUE, "heading", "px", "85%",
"heading_border_bottom_style", TRUE, "heading", "value", "solid",
"heading_border_bottom_width", TRUE, "heading", "px", "2px",
"heading_border_bottom_color", TRUE, "heading", "value", "#A8A8A8",
"column_labels_background_color", TRUE, "columns", "value", NA_character_,
"column_labels_font_size", TRUE, "columns", "px", "16px",
"column_labels_font_weight", TRUE, "columns", "value", "initial",
"column_labels_hidden", FALSE, "columns", "logical", FALSE,
"columns_border_top_style", TRUE, "columns", "value", "solid",
"columns_border_top_width", TRUE, "columns", "px", "2px",
"columns_border_top_color", TRUE, "columns", "value", "#A8A8A8",
"columns_border_bottom_style", TRUE, "columns", "value", "solid",
"columns_border_bottom_width", TRUE, "columns", "px", "2px",
"columns_border_bottom_color", TRUE, "columns", "value", "#A8A8A8",
"row_group_background_color", TRUE, "row_group", "value", NA_character_,
"row_group_font_size", TRUE, "row_group", "px", "16px",
"row_group_font_weight", TRUE, "row_group", "value", "initial",
"row_group_border_top_style", TRUE, "row_group", "value", "solid",
"row_group_border_top_width", TRUE, "row_group", "px", "2px",
"row_group_border_top_color", TRUE, "row_group", "value", "#A8A8A8",
"row_group_border_bottom_style", TRUE, "row_group", "value", "solid",
"row_group_border_bottom_width", TRUE, "row_group", "px", "2px",
"row_group_border_bottom_color", TRUE, "row_group", "value", "#A8A8A8",
"table_body_border_top_style", TRUE, "table_body", "value", "solid",
"table_body_border_top_width", TRUE, "table_body", "px", "2px",
"table_body_border_top_color", TRUE, "table_body", "value", "#A8A8A8",
"table_body_border_bottom_style", TRUE, "table_body", "value", "solid",
"table_body_border_bottom_width", TRUE, "table_body", "px", "2px",
"table_body_border_bottom_color", TRUE, "table_body", "value", "#A8A8A8",
"row_padding", TRUE, "row", "px", "8px",
"summary_row_padding", TRUE, "summary_row", "px", "8px",
"summary_row_background_color", TRUE, "summary_row", "value", NA_character_,
"summary_row_text_transform", TRUE, "summary_row", "value", "inherit",
"grand_summary_row_padding", TRUE, "grand_summary_row","px", "8px",
"grand_summary_row_background_color", TRUE, "grand_summary_row","value", NA_character_,
"grand_summary_row_text_transform", TRUE, "grand_summary_row","value", "inherit",
"footnote_padding", TRUE, "footnote", "px", "4px",
"footnote_margin", TRUE, "footnote", "px", "0px",
"footnotes_border_top_style", TRUE, "footnote", "value", "solid",
"footnotes_border_top_width", TRUE, "footnote", "px", "2px",
"footnotes_border_top_color", TRUE, "footnote", "value", "#A8A8A8",
"footnote_sep", FALSE, "footnote", "value", "<br />",
"footnote_glyph", FALSE, "footnote", "collapse_comma", "numbers",
"footnote_font_size", TRUE, "footnote", "px", "90%",
"sourcenote_padding", TRUE, "sourcenote", "px", "4px",
"sourcenote_font_size", TRUE, "sourcenote", "px", "90%",
"sourcenotes_border_top_style", TRUE, "sourcenote", "value", "solid",
"sourcenotes_border_top_width", TRUE, "sourcenote", "px", "2px",
"sourcenotes_border_top_color", TRUE, "sourcenote", "value", "#A8A8A8",
"row_striping_include_stub", FALSE, "row", "logical", FALSE,
"row_striping_include_table_body", FALSE, "row", "logical", TRUE,
)[-1, ]
}
Loading