Minor Changes
-
0b77f58: Skip rewriting generated files when the content is unchanged, so watch mode no longer bumps mtimes and
triggers extra reloads/rebuilds for no-op codegen and CSS writes.The compiler write APIs now use object params consistently:
writeArtifacts({ outdir, cwd, forceImportExtension, artifacts })writeCss({ outfile, cwd, emitLayerDeclaration })writeSplitCss({ outdir, cwd })
Patch Changes
-
bc39e0f: Fix cssgen dropping the leading dash on vendor-prefixed property names, so the class (and the CSS property)
never matched the runtime.A vendor-prefixed property is authored PascalCase —
WebkitBackgroundClip,WebkitTextFillColor,MozAppearance.
The runtimecss()hyphenates these withproperty.replace(/[A-Z]/g, "-$&").toLowerCase(), which prepends a dash to
every uppercase including the first →-webkit-background-clip, and names the class-webkit-background-clip_text.
The native engine'shyphenate_propertysuppressed the dash on the first letter (index > 0), producing
webkit-background-clip— so cssgen wrote.webkit-background-clip_text { webkit-background-clip: text }, a class
the runtime never emits and an invalid (de-prefixed) CSS property. The gradient-text pattern
(WebkitBackgroundClip: 'text'+WebkitTextFillColor: 'transparent') silently did nothing.hyphenate_propertynow prepends the dash to every uppercase letter (matching the runtime and legacy Panda's
wordRegex//[A-Z]/g), soWebkitBackgroundClip→-webkit-background-clipandMozAppearance→
-moz-appearance. camelCase props are unchanged (backgroundColor→background-color), and themsTransform→
-ms-transformspecial case is preserved. -
ac3eba5: Fix object-map utility values generating CSS selectors that do not match runtime class names.
Authored literal values now keep their literal class segment, e.g.
minHeight: '100vh'emits.min-h_100vhinstead
of reverse-mapping to.min-h_screen. -
adc8d7c: Fix the runtime
css()naming!importantclasses differently from cssgen, so the rule never matched.css({ padding: '0 !important' })putp_0_!importanton the element — the runtime hashed the whole string
(withoutSpace('0 !important')) — but cssgen wrote.p_0\!(it strips!importantand marks the class with a
trailing!). The two never matched, so the!importantdeclaration silently never applied. Same for
zIndex: '1002 !important',whiteSpace: 'nowrap !important',color: 'red.500 !important', etc.The generated runtime now mirrors legacy Panda (and the native emitter): it detects
!important, strips it before
hashing the value, and appends a trailing!to the final class —p_0!,z_1002!,c_red.500!— exactly the class
cssgen emits (.p_0\!). AddsisImportant/withoutImportantruntime helpers (matching@pandacss/shared's
/\s*!(important)?/i) and wires them intocreateCssRuntime'sserializeCss, so bothcss({})andcss\`` are
fixed in one place. -
Updated dependencies [0b77f58]
- @pandacss/compiler-shared@2.0.0-beta.2
- @pandacss/config@2.0.0-beta.2