feat: #3638670 Add a Drupal Canvas brand kit that restyles the Educare site
Ships the Canvas Brand kit palette as Bootstrap 5.3's own colour variables at the theme's current values, so changing a colour in Canvas > Brand kit restyles the whole site. A fresh install looks unchanged.
Issue: https://www.drupal.org/i/3638670 Depends on: vartheme_bs5_educare!56 (#3639239), in which the theme declares its colour defaults with zero specificity so the brand kit wins, with Canvas's CSS order unchanged. Release it first.
- 36 colours: the 8 theme colours, root colours such as
--bs-body-bg,--bs-link-colorand--bs-heading-color, and the named colours--bs-blueto--bs-gray-dark. Colours only, no fonts. - Canvas global CSS (
canvas.asset_library.global, asetPropertiesconfig action) derives what Bootstrap compiles as literals or rgb triplets (utilities, tints, buttons, focus ring, components) from the--bs-*colours. - "administer brand kit" for content_editor and content_admin. README and CHANGELOG notes.
Tested: dev site default look compared element by element, 0 colour differences; Primary, Body background and Link changes followed on the front end and the Canvas editor preview, signed in and anonymous. Fresh install (drush site:install varbase with the site template, the recipe branch and the theme MR's branch, CSS aggregation on): it installs, ships 36 colours, the global CSS and both permissions. With Primary set to #be18b3 in the Brand kit, the delivered CSS declares --bs-primary in exactly two rules: the brand kit's :root (#be18b3, loaded first) and the theme's :where(:root, [data-bs-theme="light"]) (the theme value, loaded later). :root outranks :where(), so the brand kit wins with Canvas's CSS order unchanged.
Known limits
- Applying the recipe to an existing site replaces its Canvas global CSS (no append config action exists).
- The Brand kit panel lists colours alphabetically (Canvas).
- Educare's
--bs-accentis defined outside Bootstrap's variables and does not follow the Brand kit. - Images and inline SVG icons with fixed colours do not follow.
- Headings: the palette ships a Headings colour (Canvas colours cannot be
inherit), so a heading inside a dark band withoutdata-bs-theme="dark"takes that colour instead of the band's text colour.
AI-Generated: Yes
Screenshots
From a fresh install with this MR applied (Varbase 11, Drupal 11.4, Drupal Canvas 1.12.0, CSS aggregation on). Test colour #be18b3; every colour was restored afterwards. Also on https://www.drupal.org/i/3638670.
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.
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release



