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
- Install Educare 1.0.x on Drupal Canvas.
- Open Canvas > Brand kit, add or change a colour, and save.
- 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.
- 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. - 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.
- Grant "administer brand kit" to the Content editor and Content admin roles in the recipe.
- 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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | educare-07-home-after-body-background-be18b3.png | 784.4 KB | rajab natshah |
| #3 | educare-04-home-after-orange-be18b3.png | 13.02 KB | rajab natshah |
| #3 | educare-02-canvas-brand-kit-colors.png | 394.83 KB | rajab natshah |
| #3 | educare-01b-home-default-buttons.png | 13.01 KB | rajab natshah |
Issue fork educare-3638670
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
Comment #3
rajab natshahScreenshots 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.Close-up of the hero calls to action in the default Orange.
Canvas > Brand kit on Educare lists the same Bootstrap colours with Educare's values, such as a navy Link and Body text.
After saving, the arrow circles on the live home page use the new Orange colour.
After saving Body background, the whole page background changes on the live site.
AI-Generated: Yes