{
  "id": "fade-edge-mask",
  "name": "Fade Edge Mask",
  "category": "gradients",
  "tags": [
    "mask-image",
    "scroll",
    "overflow",
    "carousel",
    "fade out"
  ],
  "description": "A horizontal scroller whose edges fade out with a mask gradient, hinting that there is more to scroll.",
  "url": "https://copy-css.com/snippets/fade-edge-mask",
  "markdown": "https://copy-css.com/snippets/fade-edge-mask.md",
  "html": "<ul class=\"fade-edges\" tabindex=\"0\" aria-label=\"Topics\">\n  <li>Design</li>\n  <li>Development</li>\n  <li>Marketing</li>\n  <li>Product</li>\n  <li>Research</li>\n  <li>Writing</li>\n  <li>Sales</li>\n  <li>Support</li>\n</ul>",
  "css": ".fade-edges {\n  --fade: 40px;\n  display: flex;\n  gap: 8px;\n  width: min(100%, 300px);\n  margin: 0;\n  padding: 4px 0;\n  overflow-x: auto;\n  list-style: none;\n  scrollbar-width: none;\n  -webkit-mask: linear-gradient(90deg, #0000, #000 var(--fade), #000 calc(100% - var(--fade)), #0000);\n  mask: linear-gradient(90deg, #0000, #000 var(--fade), #000 calc(100% - var(--fade)), #0000);\n}\n\n.fade-edges::-webkit-scrollbar {\n  display: none;\n}\n\n.fade-edges li {\n  flex: none;\n  padding: 8px 14px;\n  border-radius: 999px;\n  background: #eef2ff;\n  color: #3730a3;\n  font: 600 14px/1 system-ui, sans-serif;\n}\n\n/* Drawn inside the box so the mask does not hide it */\n.fade-edges:focus-visible {\n  border-radius: 8px;\n  outline: 2px solid #4f46e5;\n  outline-offset: -2px;\n}",
  "features": [
    "linear gradients",
    "masks",
    "Flexbox",
    "keyboard focus styles",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--fade",
      "value": "40px"
    }
  ]
}
