From 18b31321eb927c762bed91a122312bbeb836a75b Mon Sep 17 00:00:00 2001 From: Yevhenii Date: Thu, 22 Oct 2026 15:41:27 +0300 Subject: [PATCH] fix: honour `inherits: false` on registered custom properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @property { inherits: false } stops a custom property at the element that declares it (css-properties-values-api-1 §3). The native runtime inherited every custom property, so a descendant resolved a value it must not see. Every Tailwind v4 shadow-* utility composes var(--tw-ring-shadow), so a shadow-none descendant painted its ancestor's ring. The compiler publishes each registration (vp): its name, whether it inherits and its initial value, separate from :root's variables, since a declaration wins over a property's default wherever the @property rule sits. Its first pass decides every registration, the last valid @property of a name at the top level, in a layer, in @container or under an @supports that holds, as browsers register them, since lightningcss prints only the last @property of a name. A registration whose initial value depends on the element (em, rem, ch, lh, cq* units, inside calc() or a transform too) is ignored, as browsers do. One whose initial value has no descriptor here (a