Skip to content

Commit cfc5867

Browse files
committed
we have to use tailwind's base.css otherwise some of the styles are broken
but this resets h1,h2,h3…, which we don't want. So let's remove that particular declaration (dirty for now) (for instance, `focus:ring-2 focus:ring-purple-600 focus:ring-offset-2`)
1 parent 1521791 commit cfc5867

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/client/tailwind.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/* @import "tailwindcss/base"; */
1+
@import "tailwindcss/base";
22
@import "tailwindcss/components";
33
@import "tailwindcss/utilities";

src/rollup.ts

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ export async function bundleStyles({
5959
});
6060
let text = result.outputFiles[0].text;
6161
if (path === getClientPath("stdlib/inputs.css")) text = rewriteInputsNamespace(text);
62+
// dirty patch for tailwind: remove margin:0 and styles resets for headers
63+
// etc. It should probably be a tailwind plugin instead.
64+
if (path === getClientPath("tailwind.css"))
65+
text = text.replaceAll(/}[^{]*h1,\n*h2,\n*h3,\n*h4,\n*h5,\n*h6[^}]+}\s*/g, "}");
6266

6367
return text;
6468
}

0 commit comments

Comments
 (0)