0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/.changeset/cool-jokes-clap.md
Nate Moore 81545197a3
Replace class:list implementation with clsx (#8142)
* chore: replace `class:list` implementation with `clsx`

* chore: remove Set support from `class:list` test

* chore: better class:list test

* Update packages/astro/src/runtime/server/render/component.ts
2023-08-18 15:25:57 -05:00

655 B

astro
major

Fixes for the class:list directive

  • Previously, class:list would ocassionally not be merged the class prop when passed to Astro components. Now, class:list is always converted to a class prop (as a string value).
  • Previously, class:list diverged from clsx in a few edge cases. Now, class:list uses clsx directly.
    • class:list used to deduplicate matching values, but it no longer does
    • class:list used to sort individual values, but it no longer does
    • class:list used to support Set and other iterables, but it no longer does