Action links render in the wrong colour in dark mode

オープン 初心者向け
#9,082 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@manueldezman がすでに取り組んでいます。

2026年11月23日 から。

  • #9083 @manueldezman による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, scss, typescript
領域
design, frontend

調査の方向性

frontend/web/styles/styles.scss の 88 行目あたり、body.dark a ルールがある場所から始め、.text-action クラス(frontend/web/styles/_token-utilities.scss で生成される)と比較してください。より具体的な a.text-action ルールを body.dark ブロック内に追加し、次に frontend/web/components/pages/CreateOrganisationPage.tsx の 149-151 行目あたりにある View Docs アンカーを、ms-1 を追加して死んだ {' '} を削除することで修正してください。完了とは、ダークモードでリンクが紫のままで、両方のテーマで目に見える隙間がある状態で、Create Organisation ページで確認し、リストされている他の .text-action アンカーに対してもスポットチェックすることを指します。

索引モデルが issue の本文から書いたものです。

説明

How are you running Flagsmith

  • SaaS at flagsmith.com

Describe the bug

Links that use the text-action utility render in the default dark-mode anchor colour instead of the action purple.

The clearest example is the View Docs link on the Create Organisation page, next to "What is your company's desired hosting option?". In light mode the link is purple. In dark mode it is light grey, almost the same colour as the label text, so it no longer reads as a link.

The same link also has no gap after the question mark, so the line renders as "option?View Docs". That second defect appears in both themes.

Steps To Reproduce

  1. Open https://app.flagsmith.com/create with the light theme. The View Docs link is purple.
  2. Switch the theme to dark mode.
  3. The same link is now light grey, close to the label colour. No gap separates it from the question mark in either theme.

Expected behavior

An action link keeps the purple action colour in both themes, and a space separates it from the text before it.

Root cause

frontend/web/styles/styles.scss:88 contains a legacy anchor rule.

body.dark {
  background-color: $bg-dark500;
  a {
    color: $anchor-color-dark;
  }
}

body.dark a is more specific than the single .text-action class generated in frontend/web/styles/_token-utilities.scss, so the --color-text-action token never applies to an anchor in dark mode. $anchor-color-dark resolves to slate-200, a light grey that is close to the default text colour on a dark surface.

Spans with the same class are unaffected, which is why only links look wrong. Other .text-action anchors in the app have the same defect in dark mode.

  • web/components/Breadcrumb.tsx:19
  • web/components/pages/OnboardingPage.tsx:123
  • web/components/pages/OnboardingPage.tsx:132
  • web/components/pages/MetricsPage.tsx:249
  • web/components/EnvironmentDocumentCodeHelp.tsx:60
  • web/components/modals/CreateAuditLogWebhook.tsx:107
  • web/components/modals/CreateWebhook.tsx:105
  • web/components/modals/payment/Payment.tsx:142
  • web/components/modals/payment/Payment.tsx:151
  • web/components/pages/CreateOrganisationPage.tsx:151

The missing gap has a separate cause. FieldLabel renders a flex row through d-flex align-items-center, so a whitespace text node between the label text and the anchor collapses at the flex item edge. The {' '} on CreateOrganisationPage.tsx:149 has no effect.

Suggested fix

Add one rule inside the body.dark block, after the a rule.

body.dark {
  background-color: $bg-dark500;
  a {
    color: $anchor-color-dark;
  }
  a.text-action {
    color: var(--color-text-action);
  }
}

The new rule compiles to body.dark a.text-action, which is more specific than body.dark a, so it restores the token colour for every action link in dark mode. A bare a.text-action would not be enough, because it has fewer type selectors than body.dark a.

Then give the View Docs anchor ms-1 and remove the dead {' '} for the gap.

Screenshots

Light and dark mode screenshots of the View Docs link on the Create Organisation page are attached below.

主要言語
Python
スター
7.4k
フォーク
613
平均マージ
1日 11時間
マージ済み PR(30日)
144

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Flagsmith/flagsmith のほかの issue

Flagsmith/flagsmith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。