File tree 3 files changed +10
-20
lines changed
3 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const nextConfig: NextConfig = {
32
32
experimental : {
33
33
esmExternals : true ,
34
34
workerThreads : false ,
35
+ useLightningcss : true ,
35
36
} ,
36
37
} ;
37
38
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ const THEME = {
91
91
} ,
92
92
breakpoint : {
93
93
maxLayoutWidth : '89rem' ,
94
- showQuickNav : '84rem' ,
95
- showSideNav : '64rem' ,
94
+ showQuickNav : BREAKPOINTS . quickNav ,
95
+ showSideNav : BREAKPOINTS . lg ,
96
96
} ,
97
97
ease : {
98
98
out : {
@@ -113,22 +113,6 @@ const THEME = {
113
113
'4xl' : '2rem' ,
114
114
} ,
115
115
$$breakpoints : BREAKPOINT_UTILS ,
116
- $$utils : {
117
- apply ( key : string , value : unknown ) {
118
- const ctx = this as unknown as Theme ;
119
- // @ts -expect-error Not typing explicitly to avoid circular typing
120
- const val = ctx [ key ] [ value ] as Theme [ 'text' ] [ 'md' ] ;
121
- return {
122
- fontSize : val . default ,
123
- lineHeight : val . lineHeight ,
124
- letterSpacing : val . letterSpacing ,
125
- } ;
126
- } ,
127
- spacing ( number : string | number ) {
128
- const ctx = this as unknown as Theme ;
129
- return `calc(${ ctx . spacing } * ${ number } )` ;
130
- } ,
131
- } ,
132
116
} ;
133
117
134
118
export type Theme = typeof THEME ;
Original file line number Diff line number Diff line change 1
1
import type { Theme } from '@pigment-css/theme' ;
2
2
3
3
export function applyText ( theme : Theme , value : keyof Theme [ 'text' ] ) {
4
- return theme . $$utils . apply . call ( theme , 'text' , value ) ;
4
+ const val = theme . text [ value ] ;
5
+ return {
6
+ fontSize : val . default ,
7
+ lineHeight : val . lineHeight ,
8
+ letterSpacing : val . letterSpacing ,
9
+ } ;
5
10
}
6
11
7
12
export function spacing ( theme : Theme , space : number | string ) {
8
- return theme . $$utils . spacing . call ( theme , space ) ;
13
+ return `calc( ${ theme . spacing } * ${ space } )` ;
9
14
}
You can’t perform that action at this time.
0 commit comments