Prevent link styles to override CODE text color
Summary
Linked content within <code> gets its text color overridden from red to blue.
Example Project
While writing documentation for OFMX on a GitLab wiki, I came across the following little styling issue.
We use <code> to mark XML elements defined by OFMX. These are rendered in red text with light red background. Sometimes, such <code> bits are linked which causes the text color to be overridden with blue text color. Here's an example:
- Without link –>
Association to `Rwy` runway
is rendered as: Association toRwy
runway - With link ->
Association to [`Rwy` runway](#)
is rendered as: Association toRwy
runway
Given the very limited styling options, linking <code> is unusual, but comes in very handy. However, the "jumping colors" are quite distracting.
Possible fixes
Content within <code> should always be rendered in red – even in the unlikely case of being linked:
Since this is not a common use case, the side effects of such a minor CSS fix would be minimal.