Skip to content

Release request: 3.0.8 — #351 (bg-black/NN → #NaNNaNNaN) merged but unreleased #403

Description

@Liroo

#317 was fixed in main by #351, but the fix hasn't been released yet — 3.0.7 (published 2026-04-09) is still latest on npm, so bg-black/50 still silently produces no background for anyone on nativewind@5.0.0-preview.4 + Tailwind v4. Opening this separately since #317 is closed.

Any chance of cutting a 3.0.8?

It's an easy one to hit and hard to diagnose, because it fails silently and only on pure black — bg-white/50, bg-red-500/50 and custom theme tokens all work, so it reads like a config problem rather than a compiler bug. bg-black/50 is common enough (overlays, scrims, image washes) that it costs a while to track down.

Confirming the merged fix does resolve it on lightningcss 1.30.1 — I compiled a Tailwind v4 global.css through the real two-stage pipeline (@tailwindcss/postcss, then compile(css).stylesheet()) and A/B'd bg-black/70:

vanilla 3.0.7        {"backgroundColor":"#NaNNaNNaNb2"}
3.0.7 + #351         {"backgroundColor":"#000000b2"}

One detail worth noting: in the first lightningcss pass the powerless a/b channels surface as null, not NaN — it's the second pass re-parsing the emitted oklab(0% none none / .7) text that yields NaN. So Number.isNaN is the right guard at the point parseColor sees it, but null coords would slip through if that ever changes.

Interim workaround for others blocked on this — patch parseColor with the diff from #351 (bun patch react-native-css / patch-package). Note that hexColors: false and colorPrecision are not workarounds: they make the compiler emit raw oklab(...) strings RN can't parse at all, which breaks every opacity utility instead of just black.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-triagedIssue has been automatically triaged by the auto-triage workflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions