mirror of
https://github.com/prometheus/docs.git
synced 2026-02-05 15:45:27 +01:00
Show correct config link color in code boxes in dark mode
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
@@ -69,7 +69,11 @@ export default function rehypeConfigLinker() {
|
||||
if (currentHtml.includes(html)) {
|
||||
currentHtml = currentHtml.replaceAll(
|
||||
html,
|
||||
`<a href="#${anchor}">${html}</a>`
|
||||
// invertInDarkMode is to counteract the inversion of the
|
||||
// surrounding <code> element in dark mode. The link color
|
||||
// actually gets adjusted to the dark mode already, so we
|
||||
// want to revert it to the original color.
|
||||
`<a href="#${anchor}" class="invertInDarkMode">${html}</a>`
|
||||
);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user