Closed jantimon closed 1 month ago
currently negative numbers in styled components were being converted to CSS variables and evaluated at runtime, even though they are constant values
This PR fixes this by inlining negative numbers directly into the CSS output
For example:
const Button = styled.button` margin-top: ${-1}px; `;
Now correctly outputs:
.Button_xyz { margin-top: -1px; }
Instead of using CSS variables and runtime evaluation
constants/input.tsx
Fixes #191
currently negative numbers in styled components were being converted to CSS variables and evaluated at runtime, even though they are constant values
This PR fixes this by inlining negative numbers directly into the CSS output
For example:
Now correctly outputs:
Instead of using CSS variables and runtime evaluation
constants/input.tsx
to verify negative number inliningFixes #191