Generated with the help of an LLM.

Problem/Motivation

Follow-up of #3633745: Avoid light/dark mismatch between parts of the UI. Shoelace turns dark on two classes of <html>: dark-mode from Default Admin and gin--dark-mode from Gin.
Any other theme with a dark mode keeps a light builder, as a UI Suite theme hosting the builder when the site sets no admin theme.
UI Suite Bootstrap sets its dark mode on <body>, so the computed color-scheme of <html> stays normal.

Proposed resolution

Read the computed color-scheme of <body> instead of the class list. A pick in the Theme menu still wins.

Remaining tasks

  • Decide what to observe for a change of mode: the attributes of <html> and <body>, or the prefers-color-scheme media query for a theme in System mode.
  • Check Default Admin, Gin, Claro, UI Suite Bootstrap and UI Suite DSFR as host theme, light and dark.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

mogtofu33 created an issue.