Closed (fixed)
Project:
Domain
Version:
3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2026 at 22:59 UTC
Updated:
25 Mar 2026 at 23:25 UTC
Jump to comment: Most recent
PHP code blocks in the mkdocs documentation have no syntax coloring. Two issues cause this:
<?php. Without it, everything is treated as plain text — no highlighting tokens are generated.--md-code-hl-variable-color, etc.) that default most tokens to gray. The original pygments.css used bare selectors (.nv, .na, etc.) which lose the specificity battle against Material's scoped selectors.mkdocs buildmkdocs.yml: Configure pymdownx.highlight with extend_pygments_lang to pass startinline: true to the PHP lexer, so PHP code blocks are highlighted without needing <?php. Also enable pygments_lang_class to add language classes to the wrapper div.
pygments.css: Rewrite with CSS nesting under .highlight to increase specificity and override Material theme defaults. Lighten comment color from #3d7b7b to #4f7676 for WCAG AA contrast compliance.
Review and commit.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedComment #5
mably commented