Skip to content

Commit

Permalink
make docs behave on old R
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Apr 18, 2024
1 parent 8b60943 commit 1539249
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion R/style.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#' @param padding The padding around the element, given as a call to [box()]
#' @param background The color of the background fill. The background includes
#' the padding but not the margin. Can be a solid color or a gradient or pattern
#' made with [grid::linearGradient()]/[grid::radialGradient()]/[grid::pattern()]
#' made with `grid::linearGradient()`/`grid::radialGradient()`/`grid::pattern()`
#' @param border The color of the background stroke. The background includes
#' the padding but not the margin
#' @param border_size The line width of the background stroke, given as a call
Expand Down
18 changes: 14 additions & 4 deletions R/style_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@
#' @export
#'
#' @examples
#' style_set(body = body_style(), p = style(indent = em(2))) |>
#' modify_style("p", size = 16) |>
#' modify_style("str", style(weight = "bold")) |>
#' remove_style("p")
#' # Create a style
#' s_set <- style_set(body = body_style(), p = style(indent = em(2)))
#'
#' # Modify an existing tag
#' modify_style(s_set, "p", size = 16)
#'
#' # Add a new tag, supplying a full style object
#' modify_style(s_set, "str", style(weight = "bold"))
#'
#' # Same as above, but style object created implicitly
#' modify_style(s_set, "str", weight = "bold")
#'
#' # Remove a tag style
#' remove_style(s_set, "p")
#'
style_set <- function(...) {
styles <- list2(...)
Expand Down
2 changes: 1 addition & 1 deletion man/classic_style.Rd

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

2 changes: 1 addition & 1 deletion man/style.Rd

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

18 changes: 14 additions & 4 deletions man/style_set.Rd

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

0 comments on commit 1539249

Please sign in to comment.