StyleSheet.RdCSS style sheet builder
sheet <- StyleSheet$new()
sheet <- css_stylesheet()
sheet$append(style)
sheet$remove(3)
sheet$add('h1', color = 'blue')
sheet$as_character()
new_sheet <- sheet$copy()
$new(...)Initialise a stylesheet
... | all arguments treated as Style objects and added to the style sheet |
$append(...)Append Style objects to this StyleSheet
... | all arguments treated as Style objects and added to the style sheet |
$remove(indices)Remove Style objects from this StyleSheet by index.
indices | indices of Style objects to remove |
$add(..., selector = NULL)Creates a Style object and adds it to the StyleSheet. Returns the newly
created Style.
... | name/value properties |
selector | If given, then used as the the selector for this style. If
not given, then the first unnamed argument in ... is interpreted as the
character string for the selector. |
$as_character()Convert StyleSheet to a character string.
$print()Print StyleSheet to terminal.
$copy()Copy StyleSheet.