Skip to content
Prev Previous commit
Next Next commit
Add a comment on why we bail out in the comperator fn
  • Loading branch information
philipp-spiess committed Sep 11, 2024
commit 57780299f423462fb933507fe72a518cc0aeada8
3 changes: 2 additions & 1 deletion packages/tailwindcss/src/plugin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ function buildPluginApi(
}

let defaultOptionKeys = Object.keys(options?.values ?? {})

designSystem.variants.group(
() => {
designSystem.variants.functional(name, (ruleNodes, variant) => {
Expand Down Expand Up @@ -166,6 +165,8 @@ function buildPluginApi(
})
},
(a, z) => {
// Since we only define a functional variant in the group, the `kind`
// has to be `functional`.
if (a.kind !== 'functional' || z.kind !== 'functional') {
return 0
}
Expand Down