github chakra-ui/panda @pandacss/compiler@2.0.0-beta.2

latest releases: @pandacss/preset-panda@2.0.0-beta.2, @pandacss/vite@2.0.0-beta.2, @pandacss/config@2.0.0-beta.2...
pre-release5 hours ago

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 runtime css() hyphenates these with property.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's hyphenate_property suppressed 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_property now prepends the dash to every uppercase letter (matching the runtime and legacy Panda's
    wordRegex//[A-Z]/g), so WebkitBackgroundClip-webkit-background-clip and MozAppearance
    -moz-appearance. camelCase props are unchanged (backgroundColorbackground-color), and the msTransform
    -ms-transform special 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_100vh instead
    of reverse-mapping to .min-h_screen.

  • adc8d7c: Fix the runtime css() naming !important classes differently from cssgen, so the rule never matched.

    css({ padding: '0 !important' }) put p_0_!important on the element — the runtime hashed the whole string
    (withoutSpace('0 !important')) — but cssgen wrote .p_0\! (it strips !important and marks the class with a
    trailing !). The two never matched, so the !important declaration 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\!). Adds isImportant / withoutImportant runtime helpers (matching @pandacss/shared's
    /\s*!(important)?/i) and wires them into createCssRuntime's serializeCss, so both css({}) and css\`` are
    fixed in one place.

  • Updated dependencies [0b77f58]

    • @pandacss/compiler-shared@2.0.0-beta.2
    • @pandacss/config@2.0.0-beta.2

Don't miss a new panda release

NewReleases is sending notifications on new releases.