#tinySVGtip How do you create an *inset* shadow on an `img` element?
You might think inset `box-shadow`, but it doesn't work! Really, there are tons of articles & questions on StackOveflow on this very topic.
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
#SVG #filter #inset #shadow #image #svgFilter #code #coding #frontend #webDev #webDevelopment
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.