Created
December 25, 2020 12:34
-
-
Save charliepark/fb0efb57658f19a23416cb7291016102 to your computer and use it in GitHub Desktop.
How to render a visual grid on-screen so you can play with spacing in your app
This file contains 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
<div | |
id="grid" | |
style={{ | |
backgroundSize: '8px 8px', | |
backgroundPosition: '50%', | |
backgroundImage: | |
' | |
linear-gradient(to right, hsla(0, 0%, 50%, 0.5) 1px, transparent 1px), | |
linear-gradient(to bottom, hsla(0, 0%, 50%, 0.5) 1px, transparent 1px) | |
', | |
position: 'fixed', | |
top: 0, | |
right: 0, | |
bottom: 0, | |
left: 0, | |
pointerEvents: 'none', | |
zIndex: 99999, | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment