style {marquee} | R Documentation |
Create a style specification for a single tag
Description
style()
constructs a marquee_style
object specifying the styling for a
single tag. The meaning of NULL
is to inherit the value from the parent
element. It follows that top parent (the body element), must have values for
all it's options. The base_style()
constructor is a convenient constructor
for a style with sensible defaults for all it's options.
Usage
style(
family = NULL,
weight = NULL,
italic = NULL,
width = NULL,
features = NULL,
size = NULL,
color = NULL,
lineheight = NULL,
align = NULL,
tracking = NULL,
indent = NULL,
hanging = NULL,
margin = NULL,
padding = NULL,
background = NULL,
border = NULL,
border_size = NULL,
border_radius = NULL,
bullets = NULL,
underline = NULL,
strikethrough = NULL,
baseline = NULL,
img_asp = NULL
)
base_style(
family = "",
weight = "normal",
italic = FALSE,
width = "normal",
features = systemfonts::font_feature(),
size = 12,
color = "black",
lineheight = 1.6,
align = "left",
tracking = 0,
indent = 0,
hanging = 0,
margin = trbl(0, 0, rem(1)),
padding = trbl(0),
background = NA,
border = NA,
border_size = trbl(0),
border_radius = 0,
bullets = marquee_bullets,
underline = FALSE,
strikethrough = FALSE,
baseline = 0,
img_asp = 1.65
)
Arguments
family |
The name of the font family to use |
weight |
The font weight to use. Can either be a number ( |
italic |
Should the font be slanted |
width |
The font width to use. Can either be a number (“0 |
features |
A font_feature object specifying any OpenType font features to apply to the font |
size |
The size of the font in points. Can be |
color |
Is the color of the font |
lineheight |
The spacing between subsequent lines relative to the font
size. Can be |
align |
The alignment within the text. One of |
tracking |
Additional character spacing measured in 1/1000em. Can be
|
indent |
The indentation of the first line in a paragraph measured in
points. Can be |
hanging |
The indentation of all but the first line in a paragraph
measured in points. Can be |
margin |
The margin around the element, given as a call to |
padding |
The padding around the element, given as a call to |
background |
The color of the background fill. The background includes
the padding but not the margin. Can be a solid color or a gradient or pattern
made with |
border |
The color of the background stroke. The background includes the padding but not the margin |
border_size |
The line width of the background stroke, given as a call
to |
border_radius |
The corner radius of the background, given in points |
bullets |
A vector of strings to use for bullets in unordered lists.
|
underline |
Should text be underlined |
strikethrough |
Should text be strikethrough |
baseline |
The baseline shift to apply to the text |
img_asp |
The default aspect ratio for block level images if not provided by the image itself |
Value
A marquee_style
object
Examples
# A partial style
style(color = "red", underline = TRUE)
# Full style
base_style()