Description Usage Arguments Value Note Examples
View source: R/vars-bootstrap.R
Those variables can be used to customize fonts in Bootstrap and Bootswatch themes.
1 2 3 4 5 6 7 8 9 10 11 12 |
family_sans_serif |
Font family to use. |
size_base |
Size of base font, e.g. normal text, default in Bootstrap is |
size_large |
Size of large text. |
size_small |
Size of small text. |
size_h1 |
Size of h1 tags. |
size_h2 |
Size of h2 tags. |
size_h3 |
Size of h3 tags. |
size_h4 |
Size of h4 tags. |
size_h5 |
Size of h5 tags. |
size_h6 |
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/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Use a smaller font than the default
bs_vars_font(
size_base = "12px"
)
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)
}
|
$`font-size-base`
[1] "12px"
attr(,"class")
[1] "fresh_sass_vars" "bootstrap_vars" "list"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.