Skip to content

Conversation

@gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Jun 3, 2025

Allows specifying light and dark brands in one file, by customizing colors in color or typography with light: and dark:, e.g.

brand:
  color:
    foreground: 
      light: '#222'
      dark: '#eee'
    background:
      light: '#eee'
      dark: '#222'

This introduces two brand schemas, "single" and "unified". Hopefully these names are clear; happy to iterate.

brand.light and brand.dark only take single brand.

brand takes a unified brand (either inline or from a file). We split into light and dark brands and everything from that point is the same as before.

If there are no dark customizations then the unified brand has no dark mode.

Detecting whether dark mode is enabled is now depends on the resolved brand, looking at format.render instead of just format.metadata.

I think that the same two-schema approach will clarify brand.logo for dark logo #12341.

cc @gadenbuie

fixes #12797

this introduces two brand schemas, "single" and "unified"
brand.light and brand.dark can only take single
brand takes unified and then splits it
if there are no dark customizations then the unified brand has no dark mode
@gordonwoodhull gordonwoodhull added this to the v1.8 milestone Jun 3, 2025
@gordonwoodhull gordonwoodhull added enhancement New feature or request brand `_brand.yml` labels Jun 3, 2025
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jun 3, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@gordonwoodhull gordonwoodhull merged commit 7ed0d71 into main Jun 4, 2025
49 checks passed
@gordonwoodhull gordonwoodhull deleted the feature/unified-light-dark-brand branch June 4, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brand `_brand.yml` enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants