Skip to content

Commit d322f14

Browse files
committed
fix: Move headings typography adjustments to Heading component to avoid interfering with UI elements that don't look like heading but rendering using heading elements
1 parent edf17c2 commit d322f14

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/components/Heading.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { createBox, type BoxProps } from './Box';
44

55
const heading = cva({
66
base: {
7+
textRendering: 'optimizeLegibility',
8+
// @ts-expect-error Not in the types for some reason
9+
MozOsxFontSmoothing: 'grayscale',
10+
WebkitFontSmoothing: 'antialiased',
711
color: 'text',
812
fontFamily: 'heading',
913
fontWeight: 'bold',

src/panda-preset/globalCss.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ export const globalCss = defineGlobalStyles({
3838
hyphens: 'none',
3939
},
4040

41-
// Better looking headings
42-
'h1, h2, h3, h4, h5, h6': {
43-
textRendering: 'optimizeLegibility',
44-
MozOsxFontSmoothing: 'grayscale',
45-
WebkitFontSmoothing: 'antialiased',
46-
},
47-
4841
// Remove the weird gap below images
4942
'img, svg, video, canvas, audio, iframe, embed, object': {
5043
display: 'block',

0 commit comments

Comments
 (0)