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
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
It uses a single `circle` element inside an `svg` and less than 10 #CSS declarations, including those in keyframes! ✨
It uses a single `circle` element inside an `svg` and less than 10 #CSS declarations, including those in keyframes! ✨
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/...
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/...
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/...
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/...
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
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
Also an entry for this week's #CodePenChallenge codepen.io/thebabydino/...
Also an entry for this week's #CodePenChallenge codepen.io/thebabydino/...
`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 👇)
`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 👇)
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/...
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/...
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.
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.