Skip to content

fix(overview): keep the favourite star legible in dark mode - #126

Merged
moodyjmz merged 4 commits into
mainfrom
fix/favourite-star-contrast
Aug 24, 2026
Merged

fix(overview): keep the favourite star legible in dark mode#126
moodyjmz merged 4 commits into
mainfrom
fix/favourite-star-contrast

Conversation

@karlitschek

Copy link
Copy Markdown
Member

Problem

The favourite star in the list view was coloured with var(--color-warning). In the dark theme that token is #3D3010 — a near-black brown — so the star was all but invisible against the dark background.

Measured on a dev instance (dark theme): the star computed to rgb(61, 48, 16).

Fix

Use var(--color-favorite), the token Nextcloud provides for favourites (and that the Files app uses). It stays legible in every theme:

Theme --color-favorite
Default (light) #A37200
Dark #ffde00
High contrast #936B06

After the change the same star computes to rgb(255, 222, 0) in dark mode.

Notes

  • One-line style-token change; no logic, so nothing new to unit-test.
  • Source onlyjs//css/ still need a maintainer /compile.

🤖 Generated with Claude Code

The favourite star was coloured with --color-warning, which the dark
theme defines as a near-black brown (#3D3010) — the star all but vanished
against the dark background. Use --color-favorite, the token intended for
favourites, which stays legible in every theme: a bright yellow in dark
mode, a darker gold in light.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the favourite star color to remain legible across themes, especially dark mode.

Changes:

  • Replaced --color-warning with --color-favorite.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@moodyjmz moodyjmz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed: one-line CSS token swap (--color-warning → --color-favorite) for the favourite-star icon. Confirmed against Nextcloud's own theme source (DarkTheme.php, DefaultTheme.php) that --color-warning was actually poor-contrast in both themes, not just dark mode as the title suggests — light theme was 1.14:1, worse than dark's 1.37:1. --color-favorite is the officially correct token, already used by Nextcloud's own Files app favourite indicator. No regression test needed or achievable — confirmed jsdom doesn't resolve CSS custom properties, so any such assertion would be tautological.

@moodyjmz

Copy link
Copy Markdown
Contributor

/compile

nextcloud-command and others added 2 commits August 24, 2026 22:05
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
…ntrast-fix

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>

# Conflicts:
#	js/office-main.mjs.map
@moodyjmz

Copy link
Copy Markdown
Contributor

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@moodyjmz
moodyjmz merged commit 9f993d4 into main Aug 24, 2026
25 checks passed
@moodyjmz
moodyjmz deleted the fix/favourite-star-contrast branch August 24, 2026 22:12
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.

4 participants