Commit 99a5b8e
committed
fix empty canonicalization
When we canonicalized a set of classes into a new class, then we marked
the existing classes as "droppable", meaning they should be removed in
favor of the replacement.
However, if the replacement is part of the existing class list, it means
that we would get rid of everything since the replacement is now marked
for removal.
Example:
```
w-[calc(1rem+0.25rem)] h-[calc(1rem+0.25rem)] size-5
```
The w-* and h-* would be collapsed into `w-5 h-5`. Then the result of
this would look like:
```
w-5 h-5 size-5
```
Now the `w-5 h-5` will be collapsed into `size-5`, and `size-5` itself
also can be replaced by itself. But this means that `size-5` is marked
for removal and the entire class list becomes empty.
This fixes that.1 parent e098a92 commit 99a5b8e
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
450 | 454 | | |
451 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
452 | 458 | | |
453 | 459 | | |
454 | | - | |
455 | | - | |
456 | 460 | | |
457 | 461 | | |
458 | 462 | | |
| |||
0 commit comments