a streamlined CSS-in-JS solution tailor-made for Next.js, seamlessly combining the expressive power of styled-components syntax with efficient build-time extraction and minimal runtime footprint, ensuring optimal performance and easy integration with existing atomic CSS frameworks like Tailwind CSS
This PR adds support for evaluating simple calculations in CSS template literals at build time, improving runtime performance while maintaining code readability.
Changes
Added a new expression evaluator that handles:
Basic arithmetic operations (+, -, *, /)
Constant values
Member expressions (e.g. theme.spacing.lg * 2)
Parentheses for precedence control
Integrated evaluation into the CSS template literal transformer
This PR adds support for evaluating simple calculations in CSS template literals at build time, improving runtime performance while maintaining code readability.
Changes
theme.spacing.lg * 2
)Examples
Performance Impact
Notes
Fixes #174