Antialias text but not code/pre elements (#2747)

This commit is contained in:
Claire Chabas
2025-01-14 15:48:05 +01:00
committed by GitHub
parent 0e601e277b
commit 1de9d1aa33
3 changed files with 12 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Apply antialiasing on any text that are not code inline/blocks to avoid contrast issues
@@ -160,7 +160,6 @@ export async function CustomizationRootLayout(props: {
fontNotoColorEmoji.className,
`${fonts[customization.styling.font].className}`,
`${ibmPlexMono.variable}`,
'antialiased',
'bg-light',
'dark:bg-dark',
)}
@@ -23,7 +23,7 @@
@apply leading-relaxed;
}
body {
@apply text-dark dark:text-light;
@apply text-dark dark:text-light antialiased;
}
html {
@apply gutter-stable;
@@ -54,6 +54,12 @@
@apply outline-2 outline-primary/6;
}
code,
pre {
/* Don't apply antialiased to `code` and `pre` elements */
@apply subpixel-antialiased;
}
/* Light mode */
::-webkit-scrollbar {
@apply bg-dark/1;