posit-dev / brand-yml

Unified branding with a single yaml file.
https://posit-dev.github.io/brand-yml/
MIT License
1 stars 0 forks source link

Improve naming of `logo.with` and `color.with` #18

Open gadenbuie opened 1 month ago

gadenbuie commented 1 month ago

We introduced the with abstraction when we realized there was a common pattern across logo (logo files), color (color palette) and typography (fonts). Upon implementing the spec, @cscheid and I realized that fonts are sufficiently different from files and the color palette that they don't fit the with abstraction (see #3).

With only two fields supporting with, it's worth reconsidering. While I like the abstraction, I think color.palette is significantly easier to explain and understand than color.with and I think this is a strong reason to consider switching back to palette instead of with.

That leaves logo.with as a singleton, which could be renamed images without changing the implementation (in theory).

logo:
  images:
    primary: full-color.png
    reverse: full-color-reverse.png
    icon: favicon.png
    both:
      light: primary
      dark: reverse
  small: icon
  medium: both

color:
  palette:
    white: "#FFFFFF"
    black: "#151515"
    blue: "#447099"
  foreground: black
  background: white
  primary: blue

typography:
  fonts:
    - source: google
      family: Open Sans
  base:
    family: "Open Sans"
    line-height: 1.25
    size: 1rem
gadenbuie commented 1 month ago

Renamed to brand.color.palette and brand.logo.images in brand_yaml for Python.