Skip to content

Add colour and underline classes for rendered Markdown - #33

Merged
paul999 merged 2 commits into
masterfrom
issue-19/text-colour-palette
Sep 18, 2026
Merged

paul999 merged 2 commits into
masterfrom
issue-19/text-colour-palette

Conversation

@paul999

@paul999 paul999 commented Sep 18, 2026

Copy link
Copy Markdown
Member

Styles for colour and underline in rendered Markdown, for the knowledge base migration (phpbb/phpbb-website-private, issue #19 in paul999/phpbb-website-private).

Markdown has no colour or underline. When the old knowledge base is converted to Markdown, text keeps its [color] and [u] as <span class="text-…">. Colours are mapped to a small palette, so the classes are few enough for the website's Markdown renderer to whitelist. Any other HTML stays escaped.

This adds those classes to css/markdown-editor.css, scoped to .markdown-body:

Class Style
text-red #bf0000
text-darkred #800000
text-orange #dd6900
text-green #008000
text-blue #0040bf
text-navy #000080
text-purple #800080
text-underline underline

The website repeats the same list in App\Markdown\TextColours and App\Markdown\TextStyles. The two have to stay in step.

After this merges, the website PR updates composer.lock to the merge commit.

🤖 Generated with Claude Code

paul999 and others added 2 commits September 18, 2026 11:04
Markdown has no colour. The knowledge base migration
(phpbb-website-private#19) keeps the colours authors picked on the
forum as <span class="text-red"> and friends, mapped to a small
palette. The website's Markdown renderer lets exactly these classes
through (App\Markdown\TextColours). This gives them their colours
inside .markdown-body.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Markdown has no underline either. Migrated [u] text keeps it as
<span class="text-underline">, which the website's renderer lets
through alongside the colour classes (App\Markdown\TextStyles).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 18, 2026 10:16

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.

🔵 Needs a closer look

text-orange has insufficient contrast and needs an accessible adjustment with its corresponding mapping.

Pull request overview

Adds scoped Markdown colour and underline styles for migrated knowledge-base content.

Changes:

  • Adds seven text-colour classes.
  • Adds .text-underline.
  • Scopes styles to .markdown-body.
File summaries
File Description
css/markdown-editor.css Defines rendered Markdown colour and underline styles.
Review details

Suppressed comments (1)

css/markdown-editor.css:222

  • #dd6900 has only about 3.4:1 contrast against the site's white content background (css/website.css:29), below the 4.5:1 WCAG AA threshold for normal text. Migrated orange prose will therefore be difficult to read for many users; please choose a darker orange and update the corresponding TextColours mapping, or otherwise provide an accessible non-colour treatment.
.markdown-body .text-orange { color: #dd6900; }
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@paul999
paul999 merged commit ebdc34b into master Sep 18, 2026
1 check passed
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.

2 participants