Skip to content

Document the Boost theme colour modes - #1684

Open
junpataleta wants to merge 1 commit into
moodle:mainfrom
junpataleta:MDL-68037-dark-mode
Open

Document the Boost theme colour modes#1684
junpataleta wants to merge 1 commit into
moodle:mainfrom
junpataleta:MDL-68037-dark-mode

Conversation

@junpataleta

Copy link
Copy Markdown
Collaborator

Adds a Colour modes developer guide covering how Boost renders a mode with the Bootstrap 5.3 colour modes API, which custom properties and design system tokens follow it, how to audit a plugin's styles for hardcoded colours, and how to test in both modes. Also covers icons, editor content, contrast targets, and what a theme inheriting from Boost needs to know.

Notes the feature on the 5.3 developer update page, documents the new Behat --colourmode option on the running tests page, and cross-links from the styles.css plugin file, theme styles, and developer guides pages.

See MDL-68037.

Adds a Colour modes developer guide covering how Boost renders a mode
with the Bootstrap 5.3 colour modes API, which custom properties and
design system tokens follow it, how to audit a plugin's styles for
hardcoded colours, and how to test in both modes. Also covers icons,
editor content, contrast targets, and what a theme inheriting from Boost
needs to know.

Notes the feature on the 5.3 developer update page, documents the new
Behat --colourmode option on the running tests page, and cross-links
from the styles.css plugin file, theme styles, and developer guides
pages.

See MDL-68037.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 11:50
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 27d1537
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6a8d819affa55f000841d2b1
😎 Deploy Preview https://deploy-preview-1684--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@junpataleta junpataleta added the blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/ label Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds developer documentation for Boost’s new light/dark colour modes (Bootstrap 5.3 colour modes API), including guidance for plugin authors on sourcing colours from theme tokens/custom properties, auditing for hardcoded colours, and testing (including Behat support).

Changes:

  • Adds a new “Colour modes” developer guide describing how Boost applies modes and how plugins/themes should support them.
  • Documents the Behat --colourmode option and links to the new guide.
  • Cross-links the new guide from the developer update page and relevant CSS/style documentation pages.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
general/development/tools/behat/running.md Documents --colourmode usage for Behat runs and links to the new guide.
docs/guides/colourmodes/index.md New comprehensive guide explaining Boost colour modes, tokens/properties, auditing, contrast, and testing guidance.
docs/guides.md Adds the new guide to the Developer Guides list.
docs/devupdate.md Notes the new Boost colour modes feature and points readers to the guide.
docs/apis/plugintypes/theme/styles.md Adds a callout linking theme/plugin styling guidance to colour modes.
docs/apis/_files/styles-css.mdx Adds a warning reminding plugin authors to check both colour modes and linking to the guide.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

1. `-o` or `--optimize-runs` This option will split features with specified tags in all parallel runs, so they are executed first when parallel run gets executed.
You can view details of all of these using the `--help` flag to `admin/tool/behat/cli/init.php`

It can also be combined with the `--colourmode` flag, which runs the whole suite in a given colour mode for themes which support them:
- `data-bs-theme` holds the mode the page is actually rendered in, either `light` or `dark`. Every Bootstrap colour mode override, and every override in Boost, is scoped to this attribute.
- `data-colourmode` holds the mode the person chose, which may also be `auto`. It exists because `auto` can only be resolved by the browser.

The mode is decided server side, so that pages arrive in the right colours rather than flashing white first. Where the choice is `auto`, a small script in the page head resolves it against `prefers-color-scheme` before the page is painted, and keeps listening so that a device which changes its colour scheme while the page is open is followed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants