File tree 2 files changed +28
-4
lines changed
2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ export const proseClasses = cn(
7
7
'prose-a:underline-offset-[4px] prose-a:decoration-solid dark:prose-a:decoration-neutral-500 prose-a:decoration-neutral-400' ,
8
8
'prose-figure:my-0 prose-p:mb-1 prose-p:text-pretty' ,
9
9
'prose-ol:mb-0' ,
10
+ 'prose-inline-code:rounded prose-inline-code:font-mono prose-inline-code:p-[2px] prose-inline-code:border prose-inline-code:border-neutral-300 prose-inline-code:bg-neutral-200/50 prose-inline-code:dark:border-neutral-800 prose-inline-code:dark:bg-neutral-800/50' ,
10
11
) ;
Original file line number Diff line number Diff line change 1
1
import type { Config } from 'tailwindcss' ;
2
2
3
+ // Plugins:
4
+ import plugin from 'tailwindcss/plugin' ;
3
5
import twAnimate from 'tailwindcss-animate' ;
4
6
import typography from '@tailwindcss/typography' ;
5
- import { fontFamily } from 'tailwindcss/defaultTheme' ;
7
+ import defaultTheme from 'tailwindcss/defaultTheme' ;
6
8
7
9
const config = {
8
10
darkMode : [ 'class' ] ,
@@ -23,8 +25,20 @@ const config = {
23
25
} ,
24
26
extend : {
25
27
fontFamily : {
26
- sans : [ 'Geist' , ...fontFamily . sans ] ,
27
- mono : [ 'GeistMono' , ...fontFamily . mono ] ,
28
+ sans : [ 'Geist' , ...defaultTheme . fontFamily . sans ] ,
29
+ mono : [ 'GeistMono' , ...defaultTheme . fontFamily . mono ] ,
30
+ } ,
31
+ typography : {
32
+ DEFAULT : {
33
+ css : {
34
+ 'code::before' : {
35
+ content : '""' ,
36
+ } ,
37
+ 'code::after' : {
38
+ content : '""' ,
39
+ } ,
40
+ } ,
41
+ } ,
28
42
} ,
29
43
keyframes : {
30
44
'accordion-down' : {
@@ -54,7 +68,16 @@ const config = {
54
68
} ,
55
69
} ,
56
70
} ,
57
- plugins : [ twAnimate , typography ] ,
71
+ plugins : [
72
+ twAnimate ,
73
+ typography ,
74
+ plugin ( function ( { addVariant } ) {
75
+ addVariant (
76
+ 'prose-inline-code' ,
77
+ '&.prose :where(:not(pre)>code):not(:where([class~="not-prose"] *))' ,
78
+ ) ;
79
+ } ) ,
80
+ ] ,
58
81
} satisfies Config ;
59
82
60
83
export default config ;
You can’t perform that action at this time.
0 commit comments