Skip to content

Commit

Permalink
fix: border-radius
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSeage committed Dec 16, 2021
1 parent 374c548 commit 7f2a6fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/border-radius.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const BORDER_TOP_LEFT_RADIUS = BORDER + DASH + TOP + DASH + LEFT + DASH + RADIUS
BORDER_TOP_RIGHT_RADIUS = BORDER + DASH + TOP + DASH + RIGHT + DASH + RADIUS,
BORDER_BOTTOM_LEFT_RADIUS = BORDER + DASH + BOTTOM + DASH + LEFT + DASH + RADIUS,
BORDER_BOTTOM_RIGHT_RADIUS = BORDER + DASH + BOTTOM + DASH + RIGHT + DASH + RADIUS,
BORDER_RADIUS = BORDER + DASH + RADIUS,
BORDER_RADIUS_S = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS];

export class BorderRadiusStyle extends Style {
Expand Down Expand Up @@ -61,14 +62,14 @@ export class BorderRadiusStyle extends Style {
}
default:
return {
[BORDER + DASH + RADIUS]: this
[BORDER_RADIUS]: this
}
}
}

const prefix = this.prefix.slice(0, -1);
const prefix = this.prefix?.slice(0, -1);
return {
[BORDER_RADIUS_S.includes(prefix) ? prefix : BORDER + DASH + RADIUS]: this
[BORDER_RADIUS_S.includes(prefix) ? prefix : BORDER_RADIUS]: this
}
}
}

0 comments on commit 7f2a6fa

Please sign in to comment.