#tinySVGtip
#tinySVGtip
Want to turn your filled¹ reindeer² 🦌 into an outline one? You can do so with this super simple #SVG #filter!

¹needs a transparent background input
²or anything else on a transparent background, really
November 26, 2024 at 5:24 PM
#tinySVGtip You want to do it with #SVG? Here's an SVG solution too!

It uses a single `circle` element inside an `svg` and less than 10 #CSS declarations, including those in keyframes! ✨
October 5, 2024 at 4:24 PM
#tinySVGtip Better gooey effect with no matrix filter!

Each particle can get its own CSS blur filter with a value that may be any unit (SVG doesn't support this).

The assembly containing them gets an SVG filter as below.

Heavily commented demo: codepen.io/thebabydino/...
May 29, 2024 at 8:06 AM
#tinySVGtip Give box with a (semi)transparent background a gradient shadow!

Create position:absolute pseudo covering entire parent border-box. Move it behind parent.

Set desired gradient on it. Apply SVG filter that blurs & offsets it, then subtracts original out of it.

codepen.io/thebabydino/...
May 28, 2024 at 10:03 AM
#tinySVGtip Simplifying an SVG filter
May 16, 2024 at 3:05 PM
#tinySVGtip How do you create an inset shadow on an img element?

You might say inset box-shadow, but it doesn't work!

SVG filters to the rescue for an elegant solution!

✨ offset & blur image
✨ subtract it out of original image alpha ⇒ get black inner shadow
✨ paint it 🍊
✨ place it on top of img
May 13, 2024 at 8:12 PM
#tinySVGtip Create a barcode ▌│█║▌║▌║ with a CSS gradient pattern (only a handful of CSS declarations in total) + a super simple SVG filter!

Also an entry for this week's #CodePenChallenge codepen.io/thebabydino/...
May 13, 2024 at 5:03 PM
#tinySVGtip Remember to *always* set

`color-interpolation-filters='sRGB'`

for your #SVG #filter!

Otherwise: wildly different results in Chrome/ Firefox vs. Safari out of primitives that manipulate channel values (`feComponentTransfer` for gooey effect, `feColorMatrix` for stuff like 👇)
December 27, 2023 at 2:07 PM
#tinySVGtip Been using this forever, but don't think I've ever shared it here.

Easily create stripes along any direction in SVG!
✨ draw a line along that direction
✨ make it dashed
✨ make it much thicker
✨ no, not like that... I really mean much thicker!

That's it! 🥳🎉

codepen.io/thebabydino/...
November 28, 2023 at 9:15 AM
#tinySVGtip
This works in Chrome! 🤯

Wish it worked in Firefox too.

What can be achieved with it: irregularly shaped elements with borders with simple code & without using children or pseudos (for example for a thumb on a range, which can have neither). Like in the last image.
June 23, 2023 at 8:41 AM