Update toast css from shinytoastr package.

update_toastr_css(container = NULL, toast = NULL, rgba = NULL,
  hover.rgba = NULL, opacity = NULL, hover.opacity = NULL,
  radius = NULL, position = "top-center")

Arguments

container

list of style arguments for the container div. See details and example.

toast

list of style arguments for the toast. See details and example.

rgba

numeric, vector of four css rgba property values for background color, e.g., c(0, 0, 0, 0.5). See details.

hover.rgba

numeric, vector of four css rgba property values for background color on mouse hover. See details.

opacity

numeric, toast opacity. Appended to container.

hover.opacity

numeric, toast opacity on mouse hover.

radius

character, border radius, e.g., "0px".

position

character, defaults to "top-center".

Value

an html style tag.

Details

apputils already contains some toastr css overrides (loaded via use_apputils). This function allows for injecting additional or different css overrides for a specific toast container that may not already be as specified by apputils. This is typically used to adjust the app intro toast, hence the default for position is "top-center".

Note that list names and values may be quoted if necessary. See example. Should be familiar with source toastr css in addition to running the example in order to understand which elements apply to container vs. toast.

If wanting to keep text fully opaque in the toast while using semi-transparency, especially useful when adding a background image, use css rgba instead of opacity. rgba andhover.rgba nullify opacity arguments if both are provided, respectively.

Examples

update_toastr_css( list('overflow-y' = 'auto', width = '70%', height = '700px'), list(top = '100px', margin = '0 auto', left = '115px') )
#> <style>#toast-container.toast-top-center > div { #> overflow-y:auto; #> width:70%; #> height:700px; #> } #> .toast-top-center { #> top:100px; #> margin:0 auto; #> left:115px; #> } #> </style>