Create a string-representation of CSS style
Most HTML elements can be stylized by a set of CSS style properties. This function helps build CSS strings using conventional argument-passing in R.
style(...)
... |
style attributes in form of |
The general usage of CSS styling is
<span style = "color: red; border: 1px">Text</span>
The text color can be specified by 'color', the border of element by 'border', and etc.
Basic styles like color
, border
, background
work properly and mostly consistently in modern web browsers.
However, some style properties may not work consistently in
different browsers.
a string-representation of css styles
style(color = "red") style(color = "red", "font-weight" = "bold") style("background-color" = "gray", "border-radius" = "4px") style("padding-right" = "2px") formattable(mtcars, list( mpg = formatter("span", style = x ~ style(color = ifelse(x > median(x), "red", NA)))))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.