Skip to content

Commit

Permalink
Merge pull request #190 from stla/stla_fit-content
Browse files Browse the repository at this point in the history
  • Loading branch information
wch authored Oct 30, 2020
2 parents 079503c + 4a11496 commit 0741213
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ htmltools 0.5.0.9002

* Closed #101: `htmlDependency` & `renderDependencies` now allow the `script` argument to be given as a named list containing the elements: `src`, `integrity`, `crossorigin`. (@matthewstrasiotto, #188)

* Closed #189: `validateCssUnit()` now accepts `fit-content`. (#190)

htmltools 0.5.0
--------------------------------------------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions R/tags.R
Original file line number Diff line number Diff line change
Expand Up @@ -1430,9 +1430,9 @@ is.singleton <- function(x) {
#' Single element numeric vectors are returned as a character vector with the
#' number plus a suffix of \code{"px"}.
#'
#' Single element character vectors must be \code{"auto"} or \code{"inherit"},
#' a number, or a length calculated by the \code{"calc"} CSS function.
#' If the number has a suffix, it must be valid: \code{px},
#' Single element character vectors must be \code{"auto"}, \code{"fit-content"}
#' or \code{"inherit"}, a number, or a length calculated by the \code{"calc"}
#' CSS function. If the number has a suffix, it must be valid: \code{px},
#' \code{\%}, \code{ch}, \code{em}, \code{rem}, \code{pt}, \code{in}, \code{cm},
#' \code{mm}, \code{ex}, \code{pc}, \code{vh}, \code{vw}, \code{vmin}, or
#' \code{vmax}.
Expand Down Expand Up @@ -1462,7 +1462,7 @@ validateCssUnit <- function(x) {
x <- as.numeric(x)

pattern <-
"^(auto|inherit|calc\\(.*\\)|((\\.\\d+)|(\\d+(\\.\\d+)?))(%|in|cm|mm|ch|em|ex|rem|pt|pc|px|vh|vw|vmin|vmax))$"
"^(auto|inherit|fit-content|calc\\(.*\\)|((\\.\\d+)|(\\d+(\\.\\d+)?))(%|in|cm|mm|ch|em|ex|rem|pt|pc|px|vh|vw|vmin|vmax))$"

if (is.character(x) &&
!grepl(pattern, x)) {
Expand Down
25 changes: 25 additions & 0 deletions man/htmlDependency.Rd

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

6 changes: 3 additions & 3 deletions man/validateCssUnit.Rd

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

0 comments on commit 0741213

Please sign in to comment.