79505160

Date: 2025-03-13 00:37:44
Score: 1
Natty:
Report link

While drafting this question, I played around on codepen and found this solution to fix the rendering for Chromium browsers by using two separate filters:

img {
  filter: drop-shadow(1px 1px 0 black)
    drop-shadow(0px 1px 0 black)
    drop-shadow(1px -1px 0 black)
    drop-shadow(-1px 0px 0 black);
}

@-moz-document url-prefix() {
  img {
    filter: drop-shadow(1px 1px 0 black)
      drop-shadow(-1px 1px 0 black)
      drop-shadow(1px -1px 0 black)
      drop-shadow(-1px -1px 0 black);
  }
}

Firefox:

A statue with a transparent background and a thin black border

Chrome:

A statue with a transparent background and a thin black border

However, I still don't understand why this rendering difference occurs, outside of the obvious—that they implement svg rendering differently.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: fish