Robin Malfait f99302c626
Support @apply for classes outside of a @layer (#5378)
* support `@apply` for classes outside of a `@layer`

* Add failing test for respecting source order

* sort rules when using `@apply`

The `layer` was not taken into account yet when we resolved the rules
from the applyCache. This is because we set the `classCache` to the
`matches` inside of the `generateRules` function. You can think of them
as "raw" rules I guess. However, it is later in that function that we
apply the `layerOrder` to the `sort`.

This does mean that when you `@apply font-bold text-red-500` that the
rules inside the `.target {}` will be in order of the "normal" css as
well.

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-07 21:03:46 -04:00
..
2021-09-01 17:13:59 +02:00
2021-09-06 14:15:10 -04:00
2021-09-06 14:15:10 -04:00
2021-09-01 17:28:30 +02:00