Skip to content

Commit 2288d20

Browse files
committed
Import CSS consistently and non-globally when using with framework.
1 parent c3d3da4 commit 2288d20

File tree

1 file changed

+6
-8
lines changed
  • docs/modules-and-frameworks/hljs/nuxt

1 file changed

+6
-8
lines changed

docs/modules-and-frameworks/hljs/nuxt/_index.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,7 @@ vue: {
109109
isCustomElement: (tag) => tag === "code-input",
110110
},
111111
},
112-
```
113-
114-
Also add this:
115-
```javascript
116-
css: ['@webcoder49/code-input/code-input.css', 'highlight.js/styles/default.min.css'],
117-
```
118-
119-
So that the necessary css is loaded for code-input, and an example theme is loaded.
112+
```
120113

121114
> You might want to replace the second file with your own theme, but you need the first file.
122115
@@ -215,6 +208,11 @@ code-input {
215208
</style>
216209
217210
<style>
211+
/* These are necessary styles to make code-input work */
212+
@import '@webcoder49/code-input/code-input.css';
213+
/* This is one possibility of styles to use for highlighting */
214+
@import 'highlight.js/styles/default.min.css';
215+
218216
/* Notice that these styles aren't scoped */
219217
.hljs {
220218
background: #f1f1f1; /* This is a style specific to highlighted code, so needs to use highlight.js' selector.

0 commit comments

Comments
 (0)