{
  "id": "gradient-underline-link",
  "name": "Gradient Underline Link",
  "category": "text",
  "tags": [
    "link",
    "hover",
    "background-size",
    "fill",
    "multi-line"
  ],
  "description": "A link with a thin gradient underline that grows into a full highlight on hover, even across lines.",
  "url": "https://copy-css.com/snippets/gradient-underline-link",
  "markdown": "https://copy-css.com/snippets/gradient-underline-link.md",
  "html": "<p class=\"link-grad-text\">Read our <a class=\"link-grad\" href=\"#\">guide to accessible color</a> before you ship.</p>",
  "css": ".link-grad-text {\n  max-width: 15em;\n  margin: 0;\n  color: #334155;\n  font: 500 20px/1.6 system-ui, sans-serif;\n}\n\n.link-grad {\n  padding: 0 0.1em;\n  color: #312e81;\n  font-weight: 700;\n  text-decoration: none;\n  background: linear-gradient(90deg, #4f46e5, #db2777) no-repeat left bottom / 100% 3px;\n  -webkit-box-decoration-break: clone;\n  box-decoration-break: clone;\n  transition: background-size 0.3s ease, color 0.3s ease;\n}\n\n.link-grad:hover,\n.link-grad:focus-visible {\n  background-size: 100% 100%;\n  color: #ffffff;\n}\n\n.link-grad:focus-visible {\n  outline: 2px solid #312e81;\n  outline-offset: 2px;\n}",
  "features": [
    "transitions",
    "linear gradients",
    "keyboard focus styles"
  ],
  "customProperties": []
}
