Only sort pseudo elements after classes when using @apply and variants (#9765)
* Sort pseudo elements ONLY after classes * Update changelog
This commit is contained in:
parent
aac468c1fb
commit
6bd991201f
5 changed files with 51 additions and 17 deletions
|
|
@ -370,9 +370,9 @@ function processApply(root, context, localCache) {
|
|||
return -1
|
||||
} else if (a.type === 'class' && b.type === 'tag') {
|
||||
return 1
|
||||
} else if (a.type === 'class' && b.type === 'pseudo') {
|
||||
} else if (a.type === 'class' && b.type === 'pseudo' && b.value.startsWith('::')) {
|
||||
return -1
|
||||
} else if (a.type === 'pseudo' && b.type === 'class') {
|
||||
} else if (a.type === 'pseudo' && a.value.startsWith('::') && b.type === 'class') {
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ function resortSelector(sel) {
|
|||
return -1
|
||||
} else if (a.type === 'class' && b.type === 'tag') {
|
||||
return 1
|
||||
} else if (a.type === 'class' && b.type === 'pseudo' && b.value !== ':merge') {
|
||||
} else if (a.type === 'class' && b.type === 'pseudo' && b.value.startsWith('::')) {
|
||||
return -1
|
||||
} else if (a.type === 'pseudo' && a.value !== ':merge' && b.type === 'class') {
|
||||
} else if (a.type === 'pseudo' && a.value.startsWith('::') && b.type === 'class') {
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue