Problem/Motivation

Drupal Canvas ships a Brand kit (Canvas > Brand kit): colours as CSS custom properties, plus fonts. On Educare, 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 Educare 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 Educare 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.

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 Educare 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 educare-3638670

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 from a fresh install with the MR applied: Varbase 11, Drupal 11.4, Drupal Canvas 1.12.0, CSS aggregation on. Test colour #be18b3; every colour was restored afterwards.

Educare's visible brand orange is Bootstrap's --bs-orange, so the demo changes Orange, then Body background.

Two hero links, "Apply now" and "Explore programs", each with an orange arrow circle.

Close-up of the hero calls to action in the default Orange.

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

Canvas > Brand kit on Educare lists the same Bootstrap colours with Educare's values, such as a navy Link and Body text.

The "Apply now" and "Explore programs" links with their arrow circles now magenta.

After saving, the arrow circles on the live home page use the new Orange colour.

Educare home page hero with a magenta page background behind the heading and photos.

After saving Body background, the whole page background changes on the live site.

AI-Generated: Yes