Skip to content

Commit 4a71f07

Browse files
committed
fix(og): apply the leading compensation to the title, not the whole footer
On the footer the 14px nudge dragged the caption into the bottom padding as well, and the caption has no phantom leading to correct for. Matches how the sibling cover renderers scope the same offset.
1 parent 1a6e910 commit 4a71f07

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/sim/lib/og/cover-image.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,20 @@ const FOOTER_STYLE = {
9898
display: 'flex',
9999
flexDirection: 'column',
100100
width: `${COVER_TITLE_BOX_WIDTH}px`,
101-
/** Compensates for Satori adding extra invisible leading below the last line instead of splitting it evenly. */
102-
transform: 'translateY(14px)',
103101
} satisfies CSSProperties
104102
const TITLE_STYLE = {
105103
display: 'flex',
106104
flexDirection: 'column',
107105
fontWeight: 500,
108106
color: INK_COLOR,
109107
lineHeight: 1.1,
108+
/**
109+
* Compensates for Satori adding extra invisible leading below the last line
110+
* instead of splitting it evenly. It belongs on the title block, not on the
111+
* footer: on the footer it would drag the caption 14px toward the bottom
112+
* padding too, and the caption has no such leading to correct for.
113+
*/
114+
transform: 'translateY(14px)',
110115
} satisfies CSSProperties
111116
const SUBTITLE_STYLE = {
112117
display: 'flex',

0 commit comments

Comments
 (0)