Skip to content

Instantly share code, notes, and snippets.

@josh-gree
Created December 28, 2025 18:06
Show Gist options
  • Select an option

  • Save josh-gree/448e0173e479bde2640e5c58a8a7870f to your computer and use it in GitHub Desktop.

Select an option

Save josh-gree/448e0173e479bde2640e5c58a8a7870f to your computer and use it in GitHub Desktop.
Card SVG examples (fixed) for PR #6
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 140" width="100" height="140">
<!-- Card background -->
<rect x="1" y="1" width="98" height="138" rx="6" ry="6" fill="white" stroke="#333" stroke-width="1"/>
<!-- Top left rank -->
<text x="8" y="22" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#000000">A</text>
<!-- Top left suit symbol -->
<g transform="translate(4, 24)">
<svg width="16" height="16" viewBox="0 0 24 24">
<path d="M12 2L4 12c0 2.76 2.24 5 5 5 .71 0 1.39-.15 2-.42V20H9v2h6v-2h-2v-3.42c.61.27 1.29.42 2 .42 2.76 0 5-2.24 5-5L12 2z" fill="#000000"/>
</svg>
</g>
<!-- Centre suit symbol -->
<g transform="translate(30, 50)">
<svg width="40" height="40" viewBox="0 0 24 24">
<path d="M12 2L4 12c0 2.76 2.24 5 5 5 .71 0 1.39-.15 2-.42V20H9v2h6v-2h-2v-3.42c.61.27 1.29.42 2 .42 2.76 0 5-2.24 5-5L12 2z" fill="#000000"/>
</svg>
</g>
<!-- Bottom right (rotated 180 around card centre) -->
<g transform="rotate(180 50 70)">
<!-- Rank -->
<text x="8" y="22" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#000000">A</text>
<!-- Suit symbol -->
<g transform="translate(4, 24)">
<svg width="16" height="16" viewBox="0 0 24 24">
<path d="M12 2L4 12c0 2.76 2.24 5 5 5 .71 0 1.39-.15 2-.42V20H9v2h6v-2h-2v-3.42c.61.27 1.29.42 2 .42 2.76 0 5-2.24 5-5L12 2z" fill="#000000"/>
</svg>
</g>
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment