VS Code Web: highlight TODO/FIXME comments
Highlights lines that contain TODO and FIXME comments with a pastel yellow background (works on github.dev too).
Code to copy
/* Highlight TODO and FIXME comment tokens in the editor (works on github.dev too) */
.monaco-editor .mtk1[style*="italic"],
.monaco-editor span.mtk3,
.monaco-editor span.mtk6 {
/* Generic comment tokens vary by theme; broaden the catch */
}
.monaco-editor .view-line span:where([class*="mtk"]) {
--vsc-todo-bg: rgba(255,209,102,0.25);
}
.monaco-editor .view-line:has(span:where([class*="mtk"]):where([title*="TODO"], [title*="FIXME"])) {
background: rgba(255,209,102,0.08) !important;
border-left: 3px solid #ffd166 !important;
}
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's CSS panel and save — the effect appears instantly.
Rate this example
No ratings yet — be the first.