Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/css-data/src/shorthands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,25 @@ test("expand border-radius", () => {
["border-top-left-radius", "5px"],
["border-top-right-radius", "5px"],
["border-bottom-right-radius", "5px"],
["border-top-left-radius", "5px"],
["border-bottom-left-radius", "5px"],
]);
expect(expandShorthands([["border-radius", "1px 2px 3px 4px"]])).toEqual([
["border-top-left-radius", "1px"],
["border-top-right-radius", "2px"],
["border-bottom-right-radius", "3px"],
["border-top-left-radius", "4px"],
["border-bottom-left-radius", "4px"],
]);
expect(expandShorthands([["border-radius", "5px / 3px"]])).toEqual([
["border-top-left-radius", "5px 3px"],
["border-top-right-radius", "5px 3px"],
["border-bottom-right-radius", "5px 3px"],
["border-top-left-radius", "5px 3px"],
["border-bottom-left-radius", "5px 3px"],
]);
expect(expandShorthands([["border-radius", "5px 2px / 3px 4px"]])).toEqual([
["border-top-left-radius", "5px 3px"],
["border-top-right-radius", "2px 4px"],
["border-bottom-right-radius", "5px 3px"],
["border-top-left-radius", "2px 4px"],
["border-bottom-left-radius", "2px 4px"],
]);
});

Expand All @@ -194,7 +194,7 @@ test("expand border-radius with css-wide keywords", () => {
["border-top-left-radius", "inherit"],
["border-top-right-radius", "inherit"],
["border-bottom-right-radius", "inherit"],
["border-top-left-radius", "inherit"],
["border-bottom-left-radius", "inherit"],
]);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/css-data/src/shorthands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const expandBorderRadius = function* (value: CssNode) {
yield ["border-top-left-radius", topLeft] as const;
yield ["border-top-right-radius", topRight] as const;
yield ["border-bottom-right-radius", bottomRight] as const;
yield ["border-top-left-radius", bottomLeft] as const;
yield ["border-bottom-left-radius", bottomLeft] as const;
};

/**
Expand Down