Skip to content

Commit

Permalink
fix: fixed CSS scale() issue on WebKit by wrap up text in g tag
Browse files Browse the repository at this point in the history
  • Loading branch information
yuna0x0 committed Jul 18, 2020
1 parent 96f89ad commit 61442cb
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/renderStatsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
})">
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
<circle class="rank-circle" cx="-10" cy="8" r="40" />
<text
x="${rank.level.length === 1 ? "-4" : "0"}"
y="0"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
class="rank-text"
>
${rank.level}
</text>
<g class="rank-text">
<text
x="${rank.level.length === 1 ? "-4" : "0"}"
y="0"
alignment-baseline="central"
dominant-baseline="central"
text-anchor="middle"
>
${rank.level}
</text>
</g>
</g>`;

// the better user's score the the rank will be closer to zero so
Expand Down

0 comments on commit 61442cb

Please sign in to comment.