Skip to content

Commit ff6d997

Browse files
committed
Support transition property all
1 parent 7c62abe commit ff6d997

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/utils/matchTransitionProperty.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ describe("matchTransitionProperty", () => {
2929
matchTransitionProperty("-o-background", "-moz-background-color"),
3030
);
3131
});
32+
33+
it("should handle all", () => {
34+
assert.isTrue(
35+
matchTransitionProperty("-webkit-background-color", "all"),
36+
);
37+
});
3238
});

src/utils/matchTransitionProperty.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import removeVendorPrefix from "./removeVendorPrefix";
22

33
export function matchTransitionProperty(subject: string, property: string): boolean {
4+
if (property === "all") {
5+
return true;
6+
}
47
const sub = removeVendorPrefix(subject);
58
const prop = removeVendorPrefix(property);
69
if (sub.length < prop.length) {

0 commit comments

Comments
 (0)