The above is not a great idea.
https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors
Some of the text within the highlighted code block is not within elements with style
attributes, so that text inherits from the style sheet (that’s what the universal selector does).
To fix, override the Sass file:
mkdir assets/sass
cp themes/researcher/assets/sass/researcher.scss assets/sass
Then edit assets/sass/researcher.scss, changing this:
* {
color: $black;
font-family: $font-family;
font-size: $font-size;
line-height: 1.2;
}
to this:
body {
color: $black;
font-family: $font-family;
font-size: $font-size;
line-height: 1.2;
}
Use this markdown to test the results with any highlighting style:
test.md
#### Example CSS
```css
body {
font-size: 16px; /* comment */
}
```
#### Example HTML
```html
<a href="/about.html">Example</a> <!-- comment -->
```
#### Example Go HTML template
```go-html-template
{{ with $.Page.Params.content }}
{{ . | $.Page.RenderString }} {{/* comment */}}
{{ end }}
```
#### Example JS
```javascript
if ([1,"one",2,"two"].includes(value)){
console.log("Number is either 1 or 2."); // comment
}
```
#### Example markdown
```markdown
{{</* figure src="kitten.jpg" */>}}
[example](https://example.org "An example") <!-- comment -->
toml
[params]
bool = true # comment
string
```