Those variables can be used to customize fonts in Bootstrap and Bootswatch themes.
bs_vars_font(
family_sans_serif = NULL,
size_base = NULL,
size_large = NULL,
size_small = NULL,
size_h1 = NULL,
size_h2 = NULL,
size_h3 = NULL,
size_h4 = NULL,
size_h5 = NULL,
size_h6 = NULL
)
Font family to use.
Size of base font, e.g. normal text, default in Bootstrap is "15px"
.
Size of large text.
Size of small text.
Size of h1 tags.
Size of h2 tags.
Size of h3 tags.
Size of h4 tags.
Size of h5 tags.
Size of h6 tags.
a list
that can be used in create_theme
.
In Bootstrap, only size_base
is defined, all others are calculated from this one.
See default parameters for Bootstrap: https://getbootstrap.com/docs/3.4/customize/.
# Use a smaller font than the default
bs_vars_font(
size_base = "12px"
)
#> $`font-size-base`
#> [1] "12px"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars" "list"
if (interactive()) {
library(shiny)
library(fresh)
ui <- fluidPage(
use_theme(create_theme(
theme = "default",
bs_vars_font(
size_base = "32px"
)
)),
tags$h1("Big font theme"),
sidebarLayout(
sidebarPanel(
"This is the sidebar panel"
),
mainPanel(
tags$h1("First level title"),
tags$h2("Second level title"),
tags$h3("Third level title"),
tags$h4("Fourth level title"),
tags$h5("Fifth level title"),
tags$h6("Sixth level title")
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}