diff --git a/lib/styles/selectors/query/elements.ts b/lib/styles/selectors/query/elements.ts
index 374f4d02..ab02eef1 100644
--- a/lib/styles/selectors/query/elements.ts
+++ b/lib/styles/selectors/query/elements.ts
@@ -94,7 +94,7 @@ export function getWrapperTransition(
if (isTransitionElement(parent) || isTransitionGroupElement(parent)) {
return parent
}
- if (!isSkipElement(parent)) {
+ if (!isSlotElement(parent) && !isSkipElement(parent)) {
return null
}
parent = parent.parent
diff --git a/tests/lib/rules/no-unused-selector.ts b/tests/lib/rules/no-unused-selector.ts
index 76381ee1..9c78971d 100644
--- a/tests/lib/rules/no-unused-selector.ts
+++ b/tests/lib/rules/no-unused-selector.ts
@@ -206,6 +206,54 @@ tester.run("no-unused-selector", rule, {
.foo > div {}
`,
+ // transition
+ `
+
+
+
+
+
+
+ `,
+ `
+
+
+
+
+
+
+ `,
+ `
+
+
+
+
+
+
+
+ `,
+
// options
// ignoreBEMModifier
{
diff --git a/tests/lib/rules/require-selector-used-inside.ts b/tests/lib/rules/require-selector-used-inside.ts
index 876e7a91..5f41d6d8 100644
--- a/tests/lib/rules/require-selector-used-inside.ts
+++ b/tests/lib/rules/require-selector-used-inside.ts
@@ -168,6 +168,53 @@ tester.run("require-selector-used-inside", rule, {
:not(.a) {}
`,
+ // transition
+ `
+
+
+
+
+
+
+ `,
+ `
+
+
+
+
+
+
+ `,
+ `
+
+
+
+
+
+
+
+ `,
// options
// ignoreBEMModifier
{