Skip to content

Instantly share code, notes, and snippets.

@alexmwalker
Last active February 6, 2025 04:02
Show Gist options
  • Save alexmwalker/a446f4e97d42c46d3946d63e1ee9940e to your computer and use it in GitHub Desktop.
Save alexmwalker/a446f4e97d42c46d3946d63e1ee9940e to your computer and use it in GitHub Desktop.
An SVG using URL fragments to change the VIEWbox
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexmwalker
Copy link
Author

Cool. Got this working. Launch the 'RAW' link in the bottom example into a new tab and click one of the view links. It should reframe the document around that letter, and simultaneously switch on a background color. I'm not using a clip path to forcibly crop off what you can see on the edges. If you specified a height and width If wouldn't normally crop that extra image out of frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment