Add comprehensive TW test suite (627 tests), fix 4 bugs, add 9 features
Bugs fixed: - line-through: check full token not just head after hyphen split - gap-x-N/gap-y-N: compound 2-part spacing prefix handler in tw-layout - Negative values (-mt-4): replace ":" with ":-" instead of no-op - Class name doubling: chain replace calls instead of concatenating New features in tw-process-token: - !important modifier (!p-4 → padding:1rem !important) - dark: variant (class-based, .dark ancestor selector) - group-hover:/group-focus:/group-active: (parent state) - peer-focus:/peer-hover:/peer-checked:/peer-disabled: (sibling state) - @container queries (@md:flex → @container(min-width:448px)) - Colour opacity modifier (bg-sky-500/50 → hsl with alpha) - Ring colours (ring-sky-500 → --tw-ring-color) - Arbitrary values (w-[300px], grid-cols-[1fr_2fr], bg-[#ff0000]) - colour-with-alpha helper for HSL+alpha generation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,13 @@
|
||||
((tmpl (get tw-spacing-props head))
|
||||
(v (tw-spacing-value (first rest))))
|
||||
(if (nil? v) nil (tw-template tmpl v)))
|
||||
(and
|
||||
(= (len rest) 2)
|
||||
(get tw-spacing-props (str head "-" (first rest))))
|
||||
(let
|
||||
((tmpl (get tw-spacing-props (str head "-" (first rest))))
|
||||
(v (tw-spacing-value (last rest))))
|
||||
(if (nil? v) nil (tw-template tmpl v)))
|
||||
(and
|
||||
(= head "space")
|
||||
(= (len rest) 2)
|
||||
|
||||
Reference in New Issue
Block a user