@@ -62,7 +62,10 @@ export async function bundleStyles({
6262 // dirty patch for tailwind: remove margin:0 and styles resets for headers
6363 // etc. It should probably be a tailwind plugin instead.
6464 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 ; / , "" ) ;
6669
6770 return text ;
6871}
@@ -212,7 +215,8 @@ async function tailwindConfig(root: string): Promise<ESBuildPlugin> {
212215 configPath ,
213216 `
214217// 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 ?? {};
216220export default {
217221 content: {
218222 files: [
@@ -224,6 +228,15 @@ export default {
224228 darkMode: ["variant", "&:where([class~=dark], [class~=dark] *)"],
225229 blocklist: ["grid", "grid-cols-2", "grid-cols-3", "grid-cols-4"],
226230 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+ },
227240 ...config
228241};
229242`
0 commit comments