Add colour and underline classes for rendered Markdown - #33
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🔵 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
#dd6900has 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 correspondingTextColoursmapping, 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:text-red#bf0000text-darkred#800000text-orange#dd6900text-green#008000text-blue#0040bftext-navy#000080text-purple#800080text-underlineThe website repeats the same list in
App\Markdown\TextColoursandApp\Markdown\TextStyles. The two have to stay in step.After this merges, the website PR updates
composer.lockto the merge commit.🤖 Generated with Claude Code