{
  "id": "highlight-sweep",
  "name": "Highlight Sweep",
  "category": "text",
  "tags": [
    "marker",
    "mark",
    "animation",
    "emphasis",
    "background-size"
  ],
  "description": "A marker highlight that sweeps in behind key words from left to right when the page loads.",
  "url": "https://copy-css.com/snippets/highlight-sweep",
  "markdown": "https://copy-css.com/snippets/highlight-sweep.md",
  "html": "<p class=\"hl-sweep\">Launch <mark>twice as fast</mark> with less code.</p>",
  "css": ".hl-sweep {\n  max-width: 12em;\n  margin: 0;\n  color: #1f2937;\n  font: 700 26px/1.4 system-ui, sans-serif;\n}\n\n.hl-sweep mark {\n  padding: 0 0.15em;\n  color: inherit;\n  background: linear-gradient(100deg, #fde047, #facc15) no-repeat 0 0 / 0% 100%;\n  -webkit-box-decoration-break: clone;\n  box-decoration-break: clone;\n  animation: hl-sweep-in 0.9s 0.3s cubic-bezier(0.6, 0, 0.3, 1) forwards;\n}\n\n@keyframes hl-sweep-in {\n  to { background-size: 100% 100%; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .hl-sweep mark {\n    animation: none;\n    background-size: 100% 100%;\n  }\n}",
  "features": [
    "keyframe animations",
    "linear gradients",
    "reduced-motion support"
  ],
  "customProperties": []
}
