Learn R Programming

brand.yml (version 0.1.0)

brand_sass_typography: Generate Sass variables for brand typography

Description

Creates Sass variables for typography settings with the brand_typography_ prefix. Font size values in pixels are converted to rem units, and color references are resolved.

Usage

brand_sass_typography(brand)

Value

A list with one component:

  • defaults: Sass variable definitions with !default flag

Arguments

brand

A list or string of YAML representing the brand, or a path to a brand.yml file.

See Also

Other brand.yml Sass helpers: brand_sass_color(), brand_sass_color_palette(), brand_sass_defaults_bootstrap(), brand_sass_fonts()

Examples

Run this code
brand <- list(
  typography = list(
    base = list(
      size = "16px",
      "line-height" = 1.5
    ),
    headings = list(
      weight = "bold",
      style = "normal"
    )
  )
)

brand_sass_typography(brand)

Run the code above in your browser using DataLab