nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.13k stars 3.94k forks source link

[Bug]: `enforce_theme=default` Disables Browser-Based Dark/Light Mode Detection #46217

Open bromiesTM opened 4 days ago

bromiesTM commented 4 days ago

⚠️ This issue respects the following points: ⚠️

Bug description

When the enforce_theme parameter in config.php is set to default, Nextcloud does not automatically adjust the theme (dark mode or light mode) based on the browser's settings.

Steps to reproduce

  1. Set the enforce_theme parameter in config.php to default:
  2. Open Nextcloud in Browser and confirm default theme is enforced at settings/user/theming
  3. Observe that Nextcloud does not change its theme based on the browser's theme settings. (Dev Tools ⇾ Rendering ⇾ Emulate CSS media feature prefers-color-scheme)

Expected behavior

Nextcloud should automatically switch between dark mode and light mode based on the browser's theme settings when the enforce_theme parameter is set to default.

Installation method

None

Nextcloud Server version

29

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

kesselb commented 4 days ago

cc @susnux @skjnldsv

skjnldsv commented 2 days ago

Ah, we should just remove default from the example in config.sample.php. Default is not a valid theme, enforcing it makes zero sense :)