Skip to content

Commit 425eb12

Browse files
committed
Add selector for background colour for hljs
1 parent df351c1 commit 425eb12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/interface/css/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ title = 'Styling `code-input` elements with CSS'
88
99
`code-input` elements can be styled like `textarea` elements in most cases; however, there are some exceptions:
1010
* The CSS variable `--padding` should be used rather than the property `padding` (e.g. `<code-input style="--padding: 10px;">...`)
11-
* Background colours set on `code-input` elements will not work with highlighters that set background colours themselves - use `(code-input's selector) pre[class*="language-"]` for Prism.js, `(code-input's selector) TODO` for highlight.js to target the highlighted element with higher specificity than the highlighter's theme.
11+
* Background colours set on `code-input` elements will not work with highlighters that set background colours themselves - use `(code-input's selector) pre[class*="language-"]` for Prism.js or `.hljs` for highlight.js to target the highlighted element with higher specificity than the highlighter's theme. You may also set the `background-color` of the code-input element for its appearance when its template is unregistered / there is no JavaScript.
1212
* For now, elements on top of `code-input` elements should have a CSS `z-index` at least 3 greater than the `code-input` element.

0 commit comments

Comments
 (0)