This release further sharpens TriFrost’s internals, making the createCss
system more flexible for external libraries by respecting --prefixed
variables and tuning the JSX engine for even faster prop rendering.
Improved
- feat:
createCss
will no longer prefix a variable with--v-
if the variable's name starts with--
. - feat:
createCss
will no longer prefix a theme variable with--t-
if the variable's name starts with--
.
createCss({
var: {
font_header: '...',
font_body: '...',
'--something': '...'
},
theme: {
body_bg: {...},
body_fg: {...},
'--someborder': {...},
},
});
/* Will now result in: --v-font_header, --v-font_header, --something, --t-body_bg, --t-body_fg, --someborder */
- perf: The JSX runtime will now fallback to null for props instead of an empty object, allowing for a micro optimization in the render engine to short-circuit prop rendering.
The performance change in the JSX prop short-circuiting leads to an estimated 5-10% render performance boost 🚀 (based on vitest bench snapshots of common JSX trees), without sacrificing determinism or memory safety.
Previous:
Current:
PS: The code for this benchmark lives here