feat: #3638673 Add a Drupal Canvas brand kit that restyles The Rightup 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/3638673 Depends on: vartheme_bs5_rightup!73 (merged) (#3639241), 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).
- The Rightup's
--bs-accentand--bs-tertiaryare defined outside Bootstrap's variables and do 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), showing the Editorial indigo rebrand: Primary and Link #3730a3. Every colour was restored afterwards. Also on https://www.drupal.org/i/3638673.
Before the Editorial indigo rebrand: The Rightup's header uses the black Primary and story titles the black Link colour.
Canvas > Brand kit on The Rightup lists the Bootstrap colours, with Primary set to black.
For the Editorial indigo rebrand, Primary (--bs-primary) changes from #000000 to #3730A3, shown before saving.
After the Editorial indigo rebrand, the header is indigo and the story titles follow the indigo Link colour.
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



