Skip to content

Commit 5ceca29

Browse files
Merge pull request #606 from yapplabs/bug/border-spacing-firefox
bug: Support when border-spacing returns a single value
2 parents 00d5f58 + 96f0116 commit 5ceca29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

addon/src/utils/css-calculation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
*/
99
export function getBorderSpacing(el: Element) {
1010
const css = getComputedStyle(el).borderSpacing; // '0px 0px'
11-
const [horizontal, vertical] = css.split(' ');
11+
12+
const [horizontal, initialVertical] = css.split(' ');
13+
const vertical = initialVertical === undefined ? horizontal : initialVertical;
1214

1315
return {
1416
horizontal: parseFloat(horizontal ?? ''),

0 commit comments

Comments
 (0)