highlightjs / highlightjs/vue-plugin

How to set a font family for highlighjs component

Open
#55 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
241
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I tried using CSS to set a font family for highlighted code ,but it didn‘t work.
I was confused because it seems that there is not an official way to set a font family for highlightJS
When I using native highlightJS and `

`, `.hljs` it works

```css
/* a div contained a highlightjs component */
#box{
font-family: 'JetBrainsMono-Regular';
}

.highlightjs {
font-family: 'JetBrainsMono-Regular';
}

.hljs {
font-family: 'JetBrainsMono-Regular';
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.