Skip to content

Commit 9113824

Browse files
cursoragentskovhus
andcommitted
Fix sub-pixel rendering mismatch in selector-dynamicPseudoElement test
Set explicit width on the App container to avoid fractional pixel widths that cause 1px screenshot differences between the side-by-side panels. Text rendering at the button's UA font size (13.3333px) produces sub-pixel widths that sum to 539.9375px — the rounding differs between the input and output panels due to their different page positions. Co-authored-by: Kenneth Skovhus <skovhus@users.noreply.github.com>
1 parent ac8024b commit 9113824

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test-cases/selector-dynamicPseudoElement.input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Button = styled.button<{ $glowColor: string }>`
5555
`;
5656

5757
export const App = () => (
58-
<div style={{ display: "flex", gap: "16px", padding: "16px" }}>
58+
<div style={{ display: "flex", gap: "16px", padding: "16px", width: 560 }}>
5959
<Badge $badgeColor="red">Notification</Badge>
6060
<Badge $badgeColor="green">Online</Badge>
6161
<Badge $badgeColor="blue">Info</Badge>

test-cases/selector-dynamicPseudoElement.output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function Button(props: ButtonProps) {
4444
}
4545

4646
export const App = () => (
47-
<div style={{ display: "flex", gap: "16px", padding: "16px" }}>
47+
<div style={{ display: "flex", gap: "16px", padding: "16px", width: 560 }}>
4848
<Badge badgeColor="red">Notification</Badge>
4949
<Badge badgeColor="green">Online</Badge>
5050
<Badge badgeColor="blue">Info</Badge>

0 commit comments

Comments
 (0)