Checks that the argument is valid for use as a CSS unit of length.
The unit to validate. Will be treated as a number of pixels if a unit is not specified.
NA are returned unchanged.
Single element numeric vectors are returned as a character vector with the
number plus a suffix of
Single element character vectors must be
"inherit", a number, or a length calculated by the
CSS function. If the number has a suffix, it must be valid:
If the number has no suffix, the suffix
"px" is appended.
Any other value will cause an error to be thrown.
A properly formatted CSS unit of length, if possible. Otherwise, will throw an error.
validateCssUnit("10%") validateCssUnit(400) #treated as '400px'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.