Skip to content

[ENHANCEMENT] theme: add support for color-scheme#78

Merged
Gladorme merged 2 commits intoperses:mainfrom
Gladorme:fix/color-scheme
Mar 11, 2026
Merged

[ENHANCEMENT] theme: add support for color-scheme#78
Gladorme merged 2 commits intoperses:mainfrom
Gladorme:fix/color-scheme

Conversation

@Gladorme
Copy link
Member

@Gladorme Gladorme commented Mar 3, 2026

Description

Add support of color scheme in getTheme, in order to have color scheme applied to all body.
If not applied to body, components spawning outside will not have color scheme applied (Ie: drawer, modal, ...)

Related to: perses/perses#3926

Screenshots

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
return {
MuiCssBaseline: {
styleOverrides: {
body: {
Copy link
Contributor

Choose a reason for hiding this comment

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

On second thought, we probably want to allow to disable this via props on the getTheme. For embedded use cases that do not define their own overrides, then it will affect the host applications.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, fair. I will update it

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme
Copy link
Member Author

@jgbernalp should be fine now 😄

@Gladorme Gladorme merged commit 985f804 into perses:main Mar 11, 2026
12 checks passed
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.

2 participants