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