It's 2021, and we are still not settled on the best way to SVGs. Inline SVGs offer all the benefits—being able to directly modify fill color, use C...
For further actions, you may consider blocking this person and/or reporting abuse
Or, you know, just use
<object>
, which works great too :D(or
<use>
inside an<svg>
tag)Object works, but does not allow direct CSS styles to be applied.
Nope.
<object>
works kind of like putting<svg>
in a Shadow-DOM so outside CSS won't affect the inside, but inheritance should still work so you should be able to pass information in through custom properties.I am a big fan of using SVG's in Angular like html components:
selector: 'app-seats',
templateUrl: './seats.component.svg',
styleUrls: ['./seats.component.sass'],
Here is a project of mine where you can test the svg file:
nerd-corner.com/how-to-build-a-cus...
can you provide a vue example? i tried the code but i got a IntersectionObserver is not defined error.
Happy to help! Can you please share the code somewhere (Github, gist, JSFiddle)?
codesandbox.io/s/modest-mendel-146...
It seems in nuxt.js using external library (like even jQuery) takes some effort. THe easiest way I found was to include it in the head tag (kaloraat.com/articles/how-to-use-j...)
Here's the edited version: codesandbox.io/s/kind-johnson-1dfi...
This already exists for React
Not the same thing. That's a code generator, and while it solves a few problems. I think creating components out of tiny SVG icons is not the best solution to deal with this.
Niice ! Thank you
Great library!
I am facing issues of svg looking little blurry on safari on mobile. Hopefully this will solve that issue.
can i use your library to modify svg gradient's stop points.
btw i don't know very much about svg coding