Last active
December 13, 2021 20:21
-
-
Save azunyuuuuuuu/5fc3d6bc4ec19a0546b57d273eaf1a57 to your computer and use it in GitHub Desktop.
another svg test but as pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "scripts": [ | |
| "https://cdn.tailwindcss.com" | |
| ], | |
| "styles": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <svg width="100%" height="100%"> | |
| <!-- Let's define the pattern --> | |
| <!-- The width and height should be double the size of a single checker --> | |
| <pattern id="pattern-checkers" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse" > | |
| <!-- Two instances of the same checker, only positioned apart on the `x` and `y` axis --> | |
| <!-- We will define the `fill` in the CSS for flexible use --> | |
| <rect class="checker bg-red-300" x="0" width="50" height="50" y="0"/> | |
| <rect class="checker bg-blue-300" x="50" width="50" height="50" y="50"/> | |
| <rect /> | |
| </pattern> | |
| <!-- Define the shape that will contain our pattern as the fill --> | |
| <rect x="0" y="0" width="100%" height="100%" fill="url(#pattern-checkers)" /> | |
| </svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment