Learn R Programming

brand.yml (version 0.1.0)

brand_sass_fonts: Generate Sass variables and CSS rules for brand fonts

Description

Creates Sass variables and CSS rules for fonts defined in the brand object. Supports Google fonts, Bunny fonts, and file-based fonts.

Usage

brand_sass_fonts(brand)

Value

A list with two components:

  • defaults: Sass variables for font definitions

  • rules: CSS rules for applying fonts via classes

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_typography()

Examples

Run this code
brand <- list(
  typography = list(
    fonts = list(
      list(
        family = "Roboto",
        source = "google",
        weight = c(400, 700),
        style = "normal"
      )
    )
  )
)

brand_sass_fonts(brand)

Run the code above in your browser using DataLab