Skip to content

Commit a24702f

Browse files
committed
Fix code block text rendering larger on iOS
- Configure PostCSS to prefix text-size-adjust and others
1 parent dc25e59 commit a24702f

File tree

4 files changed

+1101
-1
lines changed

4 files changed

+1101
-1
lines changed

astro.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { walk as walkJS } from "estree-walker";
2525
import findCacheDirectory from "find-cache-directory";
2626
import gifsicle from "gifsicle";
2727
import { customAlphabet } from "nanoid";
28+
import postcssPresetPlugin from "postcss-preset-env";
2829
import rehypeAutolinkHeadings from "rehype-autolink-headings";
2930
import rehypeClassNames from "rehype-class-names";
3031
import rehypeExternalLinks from "rehype-external-links";
@@ -461,7 +462,11 @@ export default defineConfig({
461462
},
462463
integrations: [mdx(), optimizeMediaIntegration, compress({ Image: false })],
463464
vite: {
464-
css: { preprocessorOptions: { scss } },
465+
build: { minify: false },
466+
css: {
467+
preprocessorOptions: { scss },
468+
postcss: { plugins: [postcssPresetPlugin()] },
469+
},
465470
plugins: [generateIdsPlugin],
466471
},
467472
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"find-cache-directory": "^6.0.0",
2424
"gifsicle": "^7.0.1",
2525
"nanoid": "^5.1.6",
26+
"postcss-preset-env": "^10.5.0",
2627
"prettier": "^3.7.4",
2728
"prettier-plugin-astro": "^0.14.1",
2829
"rehype-autolink-headings": "^7.1.0",

0 commit comments

Comments
 (0)