Last active
October 26, 2019 22:18
-
-
Save zlwaterfield/38acec07228a5f26e0b55c9f1e889ef1 to your computer and use it in GitHub Desktop.
Blog code snippet - https://medium.com/gofaros/dynamic-and-responsive-svg-3de87f757e0d
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
<svg class="timeline" scale scroll-reveal viewBox="0 0 100 600" preserveAspectRatio="none"> | |
<path class="hide-gt-xs" d={`M 70 1 h 18 a 10 10 0 0 1 10 10 v ${pathHeight} a 10 10 0 0 1 -10 10 h -20 h -57 a 10 10 0 0 0 -10 10 v ${pathHeight} a 10 10 0 0 0 10 10 h 78 a 10 10 0 0 1 10 10`} /> | |
<path class="hide-xs hide-gt-sm" d="M 70 1 h 18 a 10 10 0 0 1 10 10 v 59 a 10 10 0 0 1 -10 10 h -20 h -57 a 10 10 0 0 0 -10 10 v 68 a 10 10 0 0 0 10 10 h 78 a 10 10 0 0 1 10 10" /> | |
<path class="hide-xs hide-sm" d={`M 50 1 h 20 a 10 10 0 0 1 10 10 v ${pathHeight} a 10 10 0 0 1 -10 10 h -20 h -30 a 10 10 0 0 0 -10 10 v ${pathHeight} a 10 10 0 0 0 10 10 h 60 a 10 10 0 0 1 10 10`} /> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment