Skip to content

Commit

Permalink
fix(r): Correct selector in countdown_style() (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Feb 3, 2024
1 parent 3420409 commit 9ee6b7f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Suggests:
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
4 changes: 2 additions & 2 deletions r/R/countdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ countdown_style <- function(
color_warning_background = "#E6C229",
color_warning_border = prismatic::clr_darken(color_warning_background, 0.1),
color_warning_text = NULL,
.selector = "root"
.selector = ":root"
) {
# get user args and defaults of current call
arg_names <- names(formals(countdown_style))
Expand All @@ -356,7 +356,7 @@ countdown_style <- function(
css_vars <- make_countdown_css_vars(.list = dots)
declarations <- css(!!!css_vars)

tags$style(HTML(sprintf(":%s {%s}", .selector, declarations)))
tags$style(HTML(sprintf("%s {%s}", .selector, declarations)))
}

make_countdown_css_vars <- function(..., .list = list()) {
Expand Down
1 change: 1 addition & 0 deletions r/man/countdown-package.Rd

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

2 changes: 1 addition & 1 deletion r/man/countdown.Rd

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

0 comments on commit 9ee6b7f

Please sign in to comment.