Skip to contents

Translate inline Sass to CSS style tag

Usage

add_sass(sass, .open = "|", .close = "|", .envir = rlang::caller_env())

Arguments

sass

chr with Sass

.open

[character(1): ‘\]
The opening delimiter. Doubling the full delimiter escapes it.’

.close[character(1): ‘\’]
The closing delimiter. Doubling the full delimiter escapes it.

.envir

[environment: parent.frame()]
Environment to evaluate each expression in. Expressions are evaluated from left to right. If .x is an environment, the expressions are evaluated in that environment and .envir is ignored. If NULL is passed, it is equivalent to emptyenv().

Value

shiny-tag

See also

Other ui: acc_list(), box_list(), bs4Alert(), bs_extract_status(), bs_statuses, col_10(), col_11(), col_12(), col_1(), col_2(), col_3(), col_4(), col_5(), col_6(), col_7(), col_8(), col_9(), col_auto(), copyright(), css_props(), dynamic_row(), enurl(), fa_arrow_icon(), icon_sb(), infoIcon(), jq_hide(), list_to_li(), list_to_p(), make_action_button(), make_columns(), rep_br(), tagRemoveAttributes(), ui_row(), ui_tabs(), undisplay(), with_red_star()

Other css: css_props(), list2sass()

Examples

ns <- function(x) paste0("blah-ble-",x)
add_sass("#|ns('myID')| > button {
  height: 10px;
  & option {
    text-align: center;
  }
}")
#> <style type="text/css">#blah-ble-myID > button {
#>   height: 10px;
#> }
#> 
#> #blah-ble-myID > button option {
#>   text-align: center;
#> }
#> </style>