Skip to content

Commit

Permalink
fix: expand border-bottom-left-radius from shorthand (#4326)
Browse files Browse the repository at this point in the history
Overlooked
  • Loading branch information
TrySound authored Oct 21, 2024
1 parent 5ee0860 commit e5a4b0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit e5a4b0e

Please sign in to comment.