I need to have a full screen SVG path that I draw in, but it needs to be percentage based for all devices, however when I measure the path length in JS it's just returning 400
due to the path definition being as follows:
<path id="path" d="M 0,0 0,100 100,100 100,0 0,0"></path>
I need to measure the total length of the path so I can use dash-array and dash-offset to draw it in in one smooth transition.
Here's a codepen with an example mocked up: https://codepen.io/jaybox325/pen/vjBgMe?editors=1111
Is it even possible to measure this because it's doesn't technically have an absolute length.
I have got a fallback version made using pseudo elements, but I'd like to use an SVG if possible!
Thanks!