Skip to content

feat(interactive-example): support opt-in dark mode - #1980

Draft
caugner wants to merge 1 commit into
mainfrom
965-interactive-example-dark-mode
Draft

caugner wants to merge 1 commit into
mainfrom
965-interactive-example-dark-mode

Conversation

@caugner

@caugner caugner commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Description

Update tabbed interactive examples to support light-dark, light, and dark code block keys. Unmarked examples retain their existing light appearance.

Motivation

Allow authors to opt examples into dark mode without changing existing examples.

Additional details

The first color scheme key in an example's code blocks applies to the whole example. Browser coverage was added but could not be run locally because WebdriverIO stalled before launching geckodriver.

Related issues and pull requests

Related to #965.

Read color scheme keys from interactive example code blocks and pass the selected mode to the preview runner.

Preserve existing light styling for unmarked examples while allowing opted-in examples to follow the MDN theme.
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

b55a6f0 was deployed to: https://fred-pr1980.review.mdn.allizom.net/

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant