{
  "id": "ambient-shadow",
  "name": "Ambient Color Shadow",
  "category": "shadows",
  "tags": [
    "colored",
    "ambient",
    "glow",
    "blur",
    "image",
    "shadow"
  ],
  "description": "A shadow that takes its colors from the element itself, like the glow behind album art.",
  "url": "https://copy-css.com/snippets/ambient-shadow",
  "markdown": "https://copy-css.com/snippets/ambient-shadow.md",
  "html": "<div class=\"ambient\"></div>",
  "css": ".ambient {\n  /* Works with images too: url(\"cover.jpg\") */\n  --art: linear-gradient(135deg, #f472b6, #8b5cf6 50%, #38bdf8);\n  position: relative;\n  isolation: isolate;\n  width: 160px;\n  height: 120px;\n}\n\n.ambient::before,\n.ambient::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: 16px;\n  background: var(--art) center / cover;\n}\n\n/* A blurred copy sits behind and becomes the shadow */\n.ambient::before {\n  z-index: -1;\n  inset: 14px 10px -14px;\n  filter: blur(22px) saturate(1.4);\n  opacity: 0.85;\n}",
  "features": [
    "linear gradients",
    "filters",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--art",
      "value": "linear-gradient(135deg, #f472b6, #8b5cf6 50%, #38bdf8)"
    }
  ]
}
