Skip to content

Commit

Permalink
Merge pull request #606 from yapplabs/bug/border-spacing-firefox
Browse files Browse the repository at this point in the history
bug: Support when border-spacing returns a single value
  • Loading branch information
NullVoxPopuli authored Jan 13, 2025
2 parents 00d5f58 + 96f0116 commit 5ceca29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addon/src/utils/css-calculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
*/
export function getBorderSpacing(el: Element) {
const css = getComputedStyle(el).borderSpacing; // '0px 0px'
const [horizontal, vertical] = css.split(' ');

const [horizontal, initialVertical] = css.split(' ');
const vertical = initialVertical === undefined ? horizontal : initialVertical;

return {
horizontal: parseFloat(horizontal ?? ''),
Expand Down

0 comments on commit 5ceca29

Please sign in to comment.