Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <svg xmlns="http://www.w3.org/2000/svg"> |
michael@0 | 6 | <title>Vector image without intrinsic dimensions with percentage stroke-width (proportional to the diagonal)</title> |
michael@0 | 7 | <rect y="0" width="100%" height="50%" fill="lime"/> |
michael@0 | 8 | <rect y="50%" width="100%" height="50%" fill="aqua"/> |
michael@0 | 9 | <!-- |
michael@0 | 10 | A percent stroke-width is resolved with respect to: |
michael@0 | 11 | |
michael@0 | 12 | d = sqrt(vh**2 + vw**2) / sqrt(2) |
michael@0 | 13 | |
michael@0 | 14 | where vh/vw are the image viewport width/height. Because this image has no |
michael@0 | 15 | intrinsic dimensions or ratio, it expands to fill the entire background |
michael@0 | 16 | positioning area, so its width is 100px and its height is 700px. For those |
michael@0 | 17 | carefully-chosen dimensions, d = 500px, so 10% of that creates a 50px-wide |
michael@0 | 18 | rectangle, vertically centered and horizontally left-aligned in the image. |
michael@0 | 19 | --> |
michael@0 | 20 | <line x1="25%" y1="25%" x2="25%" y2="75%" stroke="fuchsia" stroke-width="10%"/> |
michael@0 | 21 | </svg> |