diff --git a/NAMESPACE b/NAMESPACE index d475ea23b..a6ed34d8a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -75,6 +75,7 @@ export(card_footer) export(card_header) export(card_image) export(card_title) +export(css) export(font_collection) export(font_face) export(font_google) @@ -156,6 +157,7 @@ import(htmltools) import(sass) importFrom(grDevices,col2rgb) importFrom(htmltools,as.tags) +importFrom(htmltools,css) importFrom(jquerylib,jquery_core) importFrom(jsonlite,fromJSON) importFrom(lifecycle,deprecated) diff --git a/NEWS.md b/NEWS.md index 5afb7ea51..0a3d9b5aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ * Example apps provided with bslib have now moved from `examples` to `examples-shiny` to take advantage of the new `package` argument in `shiny::runExample()` with shiny >= 1.8.1. For example, try `shiny::runExample("build-a-box", package = "bslib")`. (#1049) +* bslib now re-exports `htmltools::css()` to make it easier to specify style declarations. (#1086) + ## Bug fixes * `toggle_sidebar()` once again correctly closes a sidebar. (@fredericva, #1043) diff --git a/R/bslib-package.R b/R/bslib-package.R index fb9dd3cb4..f1409cbb2 100644 --- a/R/bslib-package.R +++ b/R/bslib-package.R @@ -17,6 +17,10 @@ utils::globalVariables("!!") ## usethis namespace: end NULL +#' @export +#' @importFrom htmltools css +htmltools::css + # For usethis::use_release_issue() release_bullets <- function() { diff --git a/man/reexports.Rd b/man/reexports.Rd new file mode 100644 index 000000000..2d7e657bd --- /dev/null +++ b/man/reexports.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bslib-package.R +\docType{import} +\name{reexports} +\alias{reexports} +\alias{css} +\title{Objects exported from other packages} +\keyword{internal} +\description{ +These objects are imported from other packages. Follow the links +below to see their documentation. + +\describe{ + \item{htmltools}{\code{\link[htmltools]{css}}} +}} +