|
|
|
|
|
|
|
|
#' @examples |
|
|
#' @examples |
|
|
#' bulma_modifier(color = "primary", size = "large", state = "outlined") |
|
|
#' bulma_modifier(color = "primary", size = "large", state = "outlined") |
|
|
#' @references https://bulma.io/documentation/modifiers/syntax/ |
|
|
#' @references https://bulma.io/documentation/modifiers/syntax/ |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
|
|
|
#' @return String of modifier classes |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_modifier <- function(color = NULL, size = NULL, state = NULL) { |
|
|
bulma_modifier <- function(color = NULL, size = NULL, state = NULL) { |
|
|
color <- validate_value(color, |
|
|
color <- validate_value(color, |
|
|
|
|
|
|
|
|
#' bulma_helper(spacing = c("marginless", "paddingless")) |
|
|
#' bulma_helper(spacing = c("marginless", "paddingless")) |
|
|
#' bulma_helper(other = "clipped", float = "pulled-right") |
|
|
#' bulma_helper(other = "clipped", float = "pulled-right") |
|
|
#' @references https://bulma.io/documentation/modifiers/helpers |
|
|
#' @references https://bulma.io/documentation/modifiers/helpers |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
|
|
|
#' @return String of modifier classes |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_helper <- function(float = NULL, spacing = NULL, other = NULL) { |
|
|
bulma_helper <- function(float = NULL, spacing = NULL, other = NULL) { |
|
|
float <- validate_value(float, c("clearfix", "pulled-left", "pulled-right"), FALSE, "float") |
|
|
float <- validate_value(float, c("clearfix", "pulled-left", "pulled-right"), FALSE, "float") |
|
|
|
|
|
|
|
|
#' bulma_responsive("flex", "widescreen", only = TRUE) |
|
|
#' bulma_responsive("flex", "widescreen", only = TRUE) |
|
|
#' @references https://bulma.io/documentation/modifiers/responsive-helpers/ |
|
|
#' @references https://bulma.io/documentation/modifiers/responsive-helpers/ |
|
|
#' @return A string of helper classes |
|
|
#' @return A string of helper classes |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_responsive <- function(display = NULL, viewport = NULL, only = FALSE) { |
|
|
bulma_responsive <- function(display = NULL, viewport = NULL, only = FALSE) { |
|
|
display <- validate_value(display, c( |
|
|
display <- validate_value(display, c( |
|
|
|
|
|
|
|
|
#' |
|
|
#' |
|
|
#' @references https://bulma.io/documentation/modifiers/color-helpers |
|
|
#' @references https://bulma.io/documentation/modifiers/color-helpers |
|
|
#' @return String of modifer classes |
|
|
#' @return String of modifer classes |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_color <- function(text = NULL, background = NULL) { |
|
|
bulma_color <- function(text = NULL, background = NULL) { |
|
|
text <- validate_color(text, "text") |
|
|
text <- validate_color(text, "text") |
|
|
|
|
|
|
|
|
#' |
|
|
#' |
|
|
#' @references https://bulma.io/documentation/modifiers/typography-helpers/ |
|
|
#' @references https://bulma.io/documentation/modifiers/typography-helpers/ |
|
|
#' @return String of modifer classes |
|
|
#' @return String of modifer classes |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_typography <- function( |
|
|
bulma_typography <- function( |
|
|
size = NULL, |
|
|
size = NULL, |
|
|
|
|
|
|
|
|
#' bulma_responsive_size(2, "tablet") |
|
|
#' bulma_responsive_size(2, "tablet") |
|
|
#' bulma_responsive_size(viewport = "widescreen") |
|
|
#' bulma_responsive_size(viewport = "widescreen") |
|
|
#' @return String of modifier classes |
|
|
#' @return String of modifier classes |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_responsive_size <- function(size = "1", viewport = "desktop") { |
|
|
bulma_responsive_size <- function(size = "1", viewport = "desktop") { |
|
|
# TODO: Needs to be vectorized, matching size/viewport arguments |
|
|
# TODO: Needs to be vectorized, matching size/viewport arguments |
|
|
|
|
|
|
|
|
#' bulma_responsive_alignment(viewport = "widescreen") |
|
|
#' bulma_responsive_alignment(viewport = "widescreen") |
|
|
#' @return String of modifier classes |
|
|
#' @return String of modifier classes |
|
|
#' @references https://bulma.io/documentation/modifiers/typography-helpers/#responsive-alignment |
|
|
#' @references https://bulma.io/documentation/modifiers/typography-helpers/#responsive-alignment |
|
|
|
|
|
#' @seealso Bulma modifiers |
|
|
#' @export |
|
|
#' @export |
|
|
bulma_responsive_alignment <- function(alignment = "left", viewport = "desktop") { |
|
|
bulma_responsive_alignment <- function(alignment = "left", viewport = "desktop") { |
|
|
# TODO: Needs to be vectorized, matching alignment/viewport arguments |
|
|
# TODO: Needs to be vectorized, matching alignment/viewport arguments |