Skip to content

Commit 6454938

Browse files
arno-fukudadimaMachina
andauthoredOct 17, 2024
[ISSUE-3476] style: narrow css specificity for code elements (#3480)
* style: narrow css specificity for code elements * style: apply same css narrowing to pre>code section * Create fifty-birds-invite.md --------- Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
1 parent 9794e9e commit 6454938

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎.changeset/fifty-birds-invite.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"nextra": patch
3+
---
4+
5+
update css selectors for `code`, use `code.nextra-code`

‎packages/nextra/styles/code-block.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@apply dark:_bg-[--shiki-dark-bg] dark:_text-[--shiki-dark];
44
}
55

6-
code:not([class*='twoslash-']) {
6+
code.nextra-code:not([class*='twoslash-']) {
77
box-decoration-break: slice;
88
font-feature-settings:
99
'rlig' 1,
@@ -16,7 +16,7 @@ code:not([class*='twoslash-']) {
1616
}
1717
}
1818

19-
pre code:not([class*='twoslash-']) {
19+
pre code.nextra-code:not([class*='twoslash-']) {
2020
@apply _grid _text-sm;
2121

2222
&[data-line-numbers] > span {

0 commit comments

Comments
 (0)