Skip to content

Browser extension messes up highlight.js color schemes on other websites

Created by: h1nk

Steps to reproduce:

  1. Install the browser extension.
  2. Visit https://partner.steamgames.com/doc/webapi_overview#2

Expected behavior:

Preserve original highlight.js color scheme on website pages unrelated to sourcegraph.

image

Actual behavior:

Browser extension injects a stylesheet that clobbers the page's original CSS:

+ /* style.bundle.css */
+ .hljs-attribute, .hljs-name, .hljs-tag {
+     color: navy;
+     font-weight: 400;
+ }
- /* railscasts.css */
- .hljs-tag, .hljs-name {
-     color: #e8bf6a;
- }

image