mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-31 09:48:38 -05:00
23 lines
482 B
R
23 lines
482 B
R
\name{validateCssUnit}
|
|
\alias{validateCssUnit}
|
|
\title{Validate proper CSS formatting of a unit}
|
|
\usage{
|
|
validateCssUnit(x)
|
|
}
|
|
\arguments{
|
|
\item{x}{The unit to validate. Will be treated as a
|
|
number of pixels if a unit is not specified.}
|
|
}
|
|
\value{
|
|
A properly formatted CSS unit of length, if possible.
|
|
Otherwise, will throw an error.
|
|
}
|
|
\description{
|
|
Validate proper CSS formatting of a unit
|
|
}
|
|
\examples{
|
|
validateCssUnit("10\%")
|
|
validateCssUnit(400) #treated as '400px'
|
|
}
|
|
|