Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
SVG

209 Articles
{
,

}
Direct link to the article This Isn’t Supposed to Happen: Troubleshooting the Impossible
Case Studies SVG

This Isn’t Supposed to Happen: Troubleshooting the Impossible

What it looks like to troubleshoot one of those impossible issues that turns out to be something totally else you never thought of.
John Rhea on May 14, 2025
Direct link to the article SMIL on?
animation SVG

SMIL on?

Well, it turns out that SVG's built-in animation features were never deprecated as planned. Sure, CSS and JavaScript are more than capable of carrying the load, but it's good to know that SMIL is not dead in the water as previously thought, and is actually well-supported.
Geoff Graham on Apr 2, 2025
pattern of light and dark purple hearts stacking
Direct link to the article Handwriting an SVG Heart, With Our Hearts
SVG

Handwriting an SVG Heart, With Our Hearts

A while back on CSS-Tricks, we shared several ways to draw hearts, and the response was dreamy. Now, to show my love, I wanted to do something personal, something crafty, something with a mild amount of effort.
Ryan Trimble on Feb 14, 2025
Direct link to the article 6 Common SVG Fails (and How to Fix Them)
SVG

6 Common SVG Fails (and How to Fix Them)

Someone recently asked me how I approach debugging inline SVGs. Because it is part of the DOM, we can inspect any inline SVG in any browser DevTools. And because of that, we have the ability to scope things out and …

Mariana Beldi on Jan 17, 2023
Direct link to the article How I Made an Icon System Out of CSS Custom Properties
custom properties Sass SVG svg icons

How I Made an Icon System Out of CSS Custom Properties

SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover …

Louis Hoebregts on Sep 28, 2022
Direct link to the article How stroke-dasharray Patterns Work
patterns stroke-dasharray SVG

How stroke-dasharray Patterns Work

Say you have a line in SVG:

<svg<line x1="0" y1="30" x2="500" y2="30" stroke-color="#f8a100" /</svg

You can use the stroke-dasharray property in CSS to make dashes:

line {
  stroke-dasharray: 5;
}

That 5 value is a relative unit based …

Geoff Graham on Jul 15, 2022
Direct link to the article Mastering SVG’s stroke-miterlimit Attribute
figma illustrator stroke-linejoin stroke-miterlimit SVG

Mastering SVG’s stroke-miterlimit Attribute

So, SVG has this stroke-miterlimit presentation attribute. You’ve probably seen it when exporting an SVG from a graphic editor program, or perhaps you find out you could remove it without noticing any change to the visual appearance.

After a good …

Mariana Beldi on May 24, 2022
Direct link to the article Optimizing SVG Patterns to Their Smallest Size
SVG svg pattern SVG use

Optimizing SVG Patterns to Their Smallest Size

I recently created a brick wall pattern as part of my #PetitePatterns series, a challenge where I create organic-looking patterns or textures in SVG within 560 bytes (or approximately the size of two tweets). To fit this constraint, I have …

Bence Szabó on Mar 18, 2022
Direct link to the article SVGcode for “Live Tracing” Raster Images
generator illustrator SVG

SVGcode for “Live Tracing” Raster Images

Say you have a bitmap graphic — like a JPG, PNG, or GIF — and you wish it was vector, like SVG. What do you do? You could trace it yourself in some kind of design software. Or tools within …

Chris Coyier on Feb 9, 2022
  • 1
  • 2
  • 3
  • ...
  • 24
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top