@@ -62,7 +62,10 @@ export async function bundleStyles({
62
62
// dirty patch for tailwind: remove margin:0 and styles resets for headers
63
63
// etc. It should probably be a tailwind plugin instead.
64
64
if ( path === getClientPath ( "tailwind.css" ) )
65
- text = text . replaceAll ( / } [ ^ { ] * h 1 , \n * h 2 , \n * h 3 , \n * h 4 , \n * h 5 , \n * h 6 [ ^ } ] + } \s * / g, "}" ) ;
65
+ text = text
66
+ . replaceAll ( / } [ ^ { ] * h 1 , \n * h 2 , \n * h 3 , \n * h 4 , \n * h 5 , \n * h 6 [ ^ } ] + } \s * / g, "}" )
67
+ . replace ( / } [ ^ { ] * b o d y [ ^ } ] + } \s * / , "}" )
68
+ . replace ( / b o x - s i z i n g : \s * b o r d e r - b o x ; / , "" ) ;
66
69
67
70
return text ;
68
71
}
@@ -212,7 +215,8 @@ async function tailwindConfig(root: string): Promise<ESBuildPlugin> {
212
215
configPath ,
213
216
`
214
217
// File generated by rollup.ts; to configure tailwind, edit ${ root } /tailwind.config.js
215
- ${ s ? `import config from "../../${ twconfig } "` : "const config = {}" } ;
218
+ ${ s ? `import cfg from "../../${ twconfig } "` : "const cfg = {}" } ;
219
+ const {theme, ...config} = cfg ?? {};
216
220
export default {
217
221
content: {
218
222
files: [
@@ -224,6 +228,15 @@ export default {
224
228
darkMode: ["variant", "&:where([class~=dark], [class~=dark] *)"],
225
229
blocklist: ["grid", "grid-cols-2", "grid-cols-3", "grid-cols-4"],
226
230
prefix: "",
231
+ theme: {
232
+ screens: {
233
+ sm: "640px",
234
+ md: "768px",
235
+ lg: "calc(640px + 5rem + 192px)",
236
+ xl: "calc(640px + 7rem + 272px + 192px)"
237
+ },
238
+ ...theme
239
+ },
227
240
...config
228
241
};
229
242
`
0 commit comments