Problem/Motivation

Drupal Canvas ships a Brand kit (Canvas > Brand kit): colours as CSS custom properties, plus fonts. On The Rightup, editing a brand kit colour changes nothing on the site, because the theme does not read the brand kit variables. Canvas's "components affected" count only covers code components.

Site builders expect the brand kit to restyle the whole site.

Steps to reproduce

  1. Install The Rightup 1.0.x on Drupal Canvas.
  2. Open Canvas > Brand kit, add or change a colour, and save.
  3. View the front end: buttons, links and headings are unchanged.

Proposed resolution

Map the brand kit's --brand-* variables onto Bootstrap 5.3's own CSS variables (--bs-primary, --bs-primary-rgb, --bs-secondary, --bs-link-color, --bs-link-hover-color, --bs-body-color, --bs-body-bg, --bs-heading-color, --bs-body-font-family, the *-bg-subtle / *-border-subtle / *-text-emphasis tints, and the component-level --bs-btn-* variables). The theme and its components are built on Bootstrap 5.3 variables, so everything follows from that one mapping, with no per-component overrides.

Scope: this template only; Varbase and the base Vartheme BS5 theme are unchanged.

  1. Ship a default brand kit palette in the recipe (Primary, Secondary, Text, Headings, Background colour entities) matching the template's design tokens, named with --brand-* CSS variables.
  2. Map those variables onto the Bootstrap 5.3 variables in The Rightup theme. Cover buttons, links, headings, body text and background, badges, accordions, nav pills, pagination, form checks and subtle tints, with fallbacks so nothing changes when the brand kit is empty. Fonts named "Brand Body" and "Brand Headings" take over the theme fonts.
  3. Grant "administer brand kit" to the Content editor and Content admin roles in the recipe.
  4. Verify in a browser that saving a brand kit colour restyles the site.

Screenshots

Editorial indigo rebrand on a fresh install (Varbase 11, Drupal 11.4, Drupal Canvas 1.12.0, CSS aggregation on): Primary and Link #3730a3. Every colour was restored afterwards.

The Rightup header in black with the logo, menu and Newsletter button, above a teal "Latest" ticker and the first row of stories with black titles.

Before the Editorial indigo rebrand: The Rightup's header uses the black Primary and story titles the black Link colour.

Drupal Canvas editor with the Brand kit colour list open beside The Rightup home page preview.

Canvas > Brand kit on The Rightup lists the Bootstrap colours, with Primary set to black.

Colour form for Primary with the variable bs-primary, a black current swatch, an indigo preview swatch and hex 3730A3.

For the Editorial indigo rebrand, Primary (--bs-primary) changes from #000000 to #3730A3, shown before saving.

The same view with an indigo header and indigo story titles; the teal ticker and Newsletter button are unchanged.

After the Editorial indigo rebrand, the header is indigo and the story titles follow the indigo Link colour.

Remaining tasks

  • ✅ File an issue
  • ❌ Default brand kit palette in the recipe
  • ❌ Bootstrap 5.3 variable mapping
  • ❌ Brand kit permissions for Content editor and Content admin
  • ❌ Browser check that a brand kit change restyles the site
  • ❌ Documentation note
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ❌ Developer Documentation support
  • ❌ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • Changing a colour or font in Canvas > Brand kit restyles The Rightup site.

API changes

  • N/A

Data model changes

  • New default brand kit colour entities shipped as recipe config.

Release notes snippet

  • N/A

AI-Generated: Yes

Issue fork rightup-3638673

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Screenshots are in the issue summary.

AI-Generated: Yes

rajab natshah’s picture

  • rajab natshah committed dfc76351 on 1.0.x
    feat: #3638673 Add a Drupal Canvas brand kit that restyles The Rightup...