44,388 questions
2
votes
2
answers
111
views
Firefox ignores CSS embedded in external SVG <use> references
I have a simple external SVG file circles.svg that contains related CSS in <style> tag:
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3....
Advice
0
votes
2
replies
58
views
Can animation data of <AnimateMotion> (e.g. translation, rotation) be accessed via JavaScript in real-time?
Assume the following example, directly taken from the W3 SVG 1.1 Standard Definition, section about <animateMotion>:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE ...
3
votes
1
answer
97
views
Extruding a path without the z command in Three.js
I am trying to extrude this path using Three.js ('M10,10h100v100'). You'll note there isn’t any 'z' command in the SVG file, and it is just meant to be a polyline, going right 100 and then down 100.
...
Advice
0
votes
3
replies
63
views
Simple geojson to SVG conversion
I need a simple web application that converts geojson to SVG. And I have a good response from using ChatGPT. Included are the codes that should run on this page.
Since the code is generate by AI, and ...
0
votes
3
answers
113
views
Create repeating SVG pattern with overlapping elements and no clipping?
I want to create a pattern where a bunch of small, oddly shaped segments are butted up against each other to look like a rope. each segment of the rope would need to overlap to get the spacing to look ...
0
votes
0
answers
73
views
Why can I not get this querySelectorAll to work? [duplicate]
I have an xmldoc with an SVG element that I am trying to pre-process and clean up to do some things. The actual file has several thousand elements, and I want to remove the ones I do not want in the ...
1
vote
1
answer
114
views
SVG pixel rows change size when scaled [closed]
I am appending an SVG element to my document, but when I scale it, the pixel's become inconsistent, with certain rows becoming smaller or larger than the others to fit the desired space. In case 2 ...
1
vote
2
answers
94
views
How do I remap the output of an SVG <feTurbulence> filter's Alpha channel to span the entire range of brightness values?
I know I can create a clean grayscale fog effect by applying an <feColorMatrix> effect to the output of an <feTurbulence> effect in order to isolate the Alpha channel:
<?xml version="1....
0
votes
0
answers
69
views
Proper way to align this avalonia drawing image:
I'm drawing music notation in an avalonia app sourced from an svg like so:
internal class VerovioSvgRenderer
{
private Dictionary<string, Control> _globalDefs = new();
private ...
0
votes
0
answers
110
views
Is there a way to make a single procedural grainy-texture effect on a webpage with HTML, CSS, and SVG filters that adapts to any background color?
I'm attempting to build a webpage where the user can change the color palette between customizable darker and lighter themes. I want the page background to be textured like the following images, with ...
0
votes
2
answers
132
views
Adjacent linear gradients have small gaps after scaling
.bg {
position: relative;
--r: 32px;
--corner-size: var(--r) var(--r);
--corner-gradient: black 0%, black calc(var(--r) - var(--r)), transparent var(--r);
...
1
vote
0
answers
94
views
How to create a looping deforming Text animation
I'm trying to create an SVG animation where a shape continuously deforms (like a breathing or liquid blob).
The goal is to later place text inside the shape so that the text appears to deform along ...
0
votes
0
answers
53
views
How to display SVG using QuickLookUI inside app?
I have old code that is capable of displaying every image but not the SVG. SVG can be displayed with QuickLook using Finder. However, I cannot replicate this in app. Quick note: NSImageView can ...
0
votes
2
answers
72
views
Angular Pie Chart: How to offset SVG text labels from leader lines?
I'm building a standalone Angular Pie Chart component. I have slices drawn with <path> and leader lines with <line>. I'm trying to place the <text> labels such that:
They are ...
0
votes
0
answers
37
views
Render SVG Image from URL in React-Native
In my current project, I have to render SVG images from the URLs in the list view.
I did it using FlatList and react-native-svg, but I am facing a performance issue.
When it renders on display, it ...
3
votes
0
answers
110
views
How to automatically compute suitable colours for SVG diagrams and graphs?
I'm trying to make standalone SVG files which are suitable for embedding in any (reasonable) web page without knowing in advance whether it's a light theme or a dark theme.
For the most part this ...
0
votes
1
answer
131
views
How do I fix my SVG path getting cut off by the paper during the print dialog?
I wanted to apply a fancy border with concave corners, so I used SVG. Everything looks fine on screen, but on the print dialog, the border is cut off by the right edge of the page. The border doesn't ...
0
votes
0
answers
55
views
SVG Deciding on a viewbox size
I am working on a site where the same SVG (a progress indicator) is displayed on some pages at 40px x 40px and on some pages at 160px x 160px
Normally I set the viewbox the size I'm going to display ...
0
votes
0
answers
70
views
How to mask SVG pattern tiles that intersect with text (React/Next.js)
I'm building a hero section (Hero.tsx) in Next.js with a repeating SVG pattern background (pattern-tile.svg) in the form of a 'Ξ'. The layout (hero.layout.module.css) includes large text "MY ...
0
votes
1
answer
53
views
Why SVG doesn't stretch on Firefox when set via CSS background [duplicate]
I set the following SVG (simple diagonal line) as a background of an element.
<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'>
<path d=...
1
vote
4
answers
137
views
How to rotate text, textPath svg, html
<svg style="z-index: 0;" width="800" height="400" viewBox="1400 -1300 700 200">
<g
tabindex="0"
role="button"
>
<defs>
<marker
id="red-arrowhead"
...
1
vote
0
answers
52
views
Inkscape SVG misaligned when put into React+Vite project and won't rotate around hinge
I am making a microfuge tube that has two groups: the cap and the body. I used Inkscape to make the microfuge tube, and then I ran the XML file through Chat GPT to get a simplified version of the SVG ...
0
votes
4
answers
106
views
Chrome throwing an error for a line that has been commented out already
The following line is commented out, but still throwing an error. Why would console still throw an error for a line that is already commented out? I have commented it out using // as well as `/...../
...
2
votes
2
answers
142
views
How to make Google Maps JavaScript API zoom in/out process smoother?
I’m using the Google Maps JavaScript API with a lot of SVG markers clustered using MarkerClusterer. When I zoom in and out, the map feels laggy and the zoom animation isn’t smooth — it stutters or ...
0
votes
1
answer
145
views
Using SVG as image mask that stretches full width but has a fixed sized cut out
Im using SVGs as an mask-image to create section dividers.
I have an SVG that masks a small triangular cutout:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox=&...