mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* implement `@variant` in CSS * implement `addVariant(name, objectTree)` * update changelog * ensure that `@variant` can only be used top-level * simplify Plugin API type * Use type instead of interface (for now) * Use more realistic variant for test * Allow custom properties to use `@slot` as content * Use "cannot" instead of "can not" * Remove `@variant` right away * Throw when `@variant` is missing a selector or body * Use "CSS-in-JS" terminology instead of "CSS Tree" * Rename tests * Mark some tests that seem wrong * Tweak comment, remove unnecessary return * Ensure group is usable with custom selector lists * Only apply extra `:is(…)` when there are multiple selectors * Tweak comment * Throw when @variant has both selector and body * Rework tests to use more realistic examples * Compound variants on an isolated copy This prevents traversals from leaking across variants * Handle selector lists for peer variants * Ignore at rules when compounding group and peer variants * Re-enable skipped tests * Update changelog --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Co-authored-by: Jordan Pittman <jordan@cryptica.me>