Skip to content

Commit

Permalink
466 bslib::bs_theme dev version (#485)
Browse files Browse the repository at this point in the history
Closes #466 

Modified getting the path to the sass file.
This is still a brittle solution.
  • Loading branch information
chlebowa authored Oct 24, 2023
1 parent c91445b commit ac790e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Imports:
shinyWidgets (>= 0.6.2),
teal.data (>= 0.3.0),
teal.logger (>= 0.1.1),
teal.widgets (>= 0.4.0)
teal.widgets (>= 0.4.0),
utils
Suggests:
knitr (>= 1.42),
MultiAssayExperiment,
SummarizedExperiment,
testthat (>= 3.1.5),
utils,
withr (>= 2.1.0)
VignetteBuilder:
knitr
Expand Down
6 changes: 5 additions & 1 deletion R/FilterState-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ fetch_bs_color <- function(color, alpha = NULL) {

# locate file that describes the current theme
## TODO this is not ideal
sass_file <- bslib::bs_theme()[["layers"]][[2]][["defaults"]][[1]]
sass_file <- if (utils::packageVersion("bslib") < as.package_version("0.5.1.9000")) {
bslib::bs_theme()[["layers"]][[2]][["defaults"]][[1]]
} else {
bslib::bs_theme()[["layers"]][[2]][["defaults"]][[1]][[1]]
}
sass_file <- attr(sass_file, "sass_file_path")

# load scss file that encodes variables
Expand Down

0 comments on commit ac790e4

Please sign in to comment.