felixfbecker / svg-screenshots

📸🧩 Browser extension to take scalable, semantic, accessible screenshots of websites in SVG format.
809 stars 29 forks source link

Use a css selector for the capture #78

Open NatoBoram opened 3 years ago

NatoBoram commented 3 years ago

Hi!

I wanted to convert a button entirely done in HTML/CSS into a .svg image for direct usage elsewhere, but the only way I see to take a capture is to drag the mouse over elements in the web page, which is pretty inconvenient and error-prone.

It would be nice if it was possible to use a css selector to target just the right element, like uBlock Origin does.

felixfbecker commented 3 years ago

That would be cool and not too hard to implement with document.elementFromPoint(). Happy to accept a PR!