{
  "id": "scroll-shadows",
  "name": "Scroll Shadows",
  "category": "shadows",
  "tags": [
    "overflow",
    "scroll hint",
    "background-attachment",
    "list",
    "no javascript"
  ],
  "description": "Shadows that appear at the top and bottom of a scroll box only while more content is hidden there.",
  "url": "https://copy-css.com/snippets/scroll-shadows",
  "markdown": "https://copy-css.com/snippets/scroll-shadows.md",
  "html": "<ul class=\"scroll-shadows\" tabindex=\"0\" aria-label=\"Release notes\">\n  <li>v2.6 Faster search</li>\n  <li>v2.5 Keyboard shortcuts</li>\n  <li>v2.4 Dark mode</li>\n  <li>v2.3 Team folders</li>\n  <li>v2.2 Export to PDF</li>\n  <li>v2.1 Comments</li>\n  <li>v2.0 New editor</li>\n</ul>",
  "css": "/* White covers move with the content (local) and hide the shadows at either end */\n.scroll-shadows {\n  box-sizing: border-box;\n  width: 220px;\n  max-height: 150px;\n  margin: 0;\n  padding: 0 16px;\n  overflow: auto;\n  border-radius: 12px;\n  list-style: none;\n  color: #334155;\n  font: 14px/1.4 system-ui, sans-serif;\n  background:\n    linear-gradient(#ffffff 30%, #ffffff00) top / 100% 40px no-repeat local,\n    linear-gradient(#ffffff00, #ffffff 70%) bottom / 100% 40px no-repeat local,\n    radial-gradient(farthest-side at 50% 0, #0f172a40, #0f172a00) top / 100% 14px no-repeat scroll,\n    radial-gradient(farthest-side at 50% 100%, #0f172a40, #0f172a00) bottom / 100% 14px no-repeat scroll,\n    #ffffff;\n}\n\n.scroll-shadows li {\n  padding: 10px 0;\n  border-bottom: 1px solid #f1f5f9;\n}\n\n.scroll-shadows:focus-visible {\n  outline: 2px solid #2563eb;\n  outline-offset: 2px;\n}",
  "features": [
    "linear gradients",
    "radial gradients",
    "keyboard focus styles"
  ],
  "customProperties": []
}
