Skip to content

fix: inconsistent behaviour between FluentDesignTheme and loading-theme  #3897

Open
@davhdavh

Description

@davhdavh

🐛 Bug Report

Followup to #3502

The set mode was fixed in #3516, but the colorSchemeListener does not use the mode setter, it just changes the baseLayerLuminance.

Also theming is very inconsistent in behaviour:

  • If mode is not set on loading-theme, then data-theme on not set and css-styling is thus not possible.
  • If mode is set to system on loading-theme, then data-theme is set, but colorSchemeListener doesnt work.
  • If any mode is set on loading-theme, the storage-name is ignored.
  • If you have <FluentDesignTheme /> in static context, it is same as loading-theme without mode, but storage-name works.
  • If you have <FluentDesignTheme /> in interactive context, it is same as loading-theme with mode set to system.
  • And even if all of these were working, the data-theme on body is not re-applied on page changes on enhanced navigation.
  • And if you try to monitor --base-layer-luminance you also lose, since that always resets to 0.15 on enhanced navigation.
  • And if you visit an external page, and then press back... data-theme is gone.

So it is pretty much impossible to find a set of settings that works no matter if a user starts on a static page, a dynamic page, has set their theme, haven't set their theme etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions