Skip to content

Commit

Permalink
Fix icon not displaying properly on Safari (#14)
Browse files Browse the repository at this point in the history
* Fix icon not displaying properly on Safari

* Alternative fix by changing <span> to <div>

---------

Co-authored-by: JimmyZJX <x@201a.cn>
  • Loading branch information
yukixz and JimmyZJX authored Jan 11, 2024
1 parent 3107f4c commit bfb35cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Icon({ item, size, game_name }) {
const tw = total_width * scale, th = total_height * scale;
const bgx = -x * scale, bgy = -y * scale;

return <><span className={`icon-${game_name}`}
return <><div className={`icon-${game_name}`}
style={{
width: size, height: size,
backgroundPosition: `${bgx}px ${bgy}px`,
Expand Down

0 comments on commit bfb35cd

Please sign in to comment.