mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
This change continues the CSS code size reduction effort by converting
comptime parameters to runtime in property handler helper functions.
**Changes:**
1. **border.zig**:
- Removed unused `P: u8` parameter from `GenericBorder` function
- Reduced from 12 instantiations to 2 (one per style type)
2. **transition.zig**:
- Converted `comptime feature: Feature` to runtime `feature: Feature`
- Reduced property() method instantiations from 4 to 1
3. **background.zig**:
- Replaced generic `push()` with specific typed push functions
- Removed comptime `property_field_name` parameter
- Removed `val: anytype` in favor of explicit types
- Created specific functions: pushBackground, pushBackgroundColor,
pushBackgroundImage, pushBackgroundPosition, etc.
4. **font.zig**:
- Removed `PropertyName` enum and generic helpers
- Replaced with specific typed helper functions for each property
- Created propertyHelperFamily, propertyHelperSize, etc.
- Created pushFont, pushFontFamily, pushFontSize, etc.
- Removed `val: anytype` in favor of explicit types
5. **outline.zig**:
- Updated to use GenericBorder without unused parameter
These changes eliminate comptime bloat while maintaining identical
functionality. All CSS tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
1 line
13 B
CSS
1 line
13 B
CSS
.test{color:} |