style_banner {xaringanExtra} | R Documentation |
Style Banner
Description
Change the banner style properties for a specific selector. By default, the
changes apply to all banners, but by setting selector
you can apply style
changes to the banners of specific slide styles. For example, to set the
styles for inverse slides, use selector = ".inverse"
.
Usage
style_banner(
text_color = NULL,
background_color = NULL,
padding_horizontal = NULL,
padding_vertical = NULL,
height = NULL,
width = NULL,
font_size = NULL,
font_family = NULL,
z_index = NULL,
selector = ":root"
)
Arguments
text_color |
The color of text in the banners which may be overridden by other styles, e.g. link color, etc. The default value inherits from the primary text color of the slide. |
background_color |
The color of the banner background. By default the background is transparent. |
padding_horizontal , padding_vertical |
The inner padding of the banner.
By default no padding is applied in the vertical direction, but |
height |
The height of the banner in a valid CSS unit. |
width |
The maximum width of each column in the banner. You can set the
width for all columns with a single valid CSS unit, or you may provide a
vector of CSS units, named |
font_size , font_family |
The font size and family of the text in the
banner. The default font size is |
z_index |
The z-index of the banner. By default this value is 0 so that
all other content appears over the banner. To ensure the banner appears
above slide content, you can set |
selector |
A CSS selector, e.g. |
Value
Returns a <style>
tag with the banner styles for selector
as
HTML via htmltools::HTML()
.
See Also
Examples
style_banner(text_color = "red")
style_banner(text_color = "white", background_color = "red")