{
  "id": "fluid-typography",
  "name": "Fluid Typography",
  "category": "text",
  "tags": [
    "clamp",
    "responsive",
    "font-size",
    "container units",
    "scale"
  ],
  "description": "Headings and body text that scale smoothly with their container using clamp(), with no breakpoints.",
  "url": "https://copy-css.com/snippets/fluid-typography",
  "markdown": "https://copy-css.com/snippets/fluid-typography.md",
  "html": "<article class=\"fluid-type\">\n  <h2>Fluid type</h2>\n  <p>Sizes scale smoothly with the container, between a set minimum and maximum.</p>\n</article>",
  "css": "/* cqi follows the container width. Swap it for vw to follow the viewport. */\n.fluid-type {\n  container-type: inline-size;\n  color: #0f172a;\n  font-family: system-ui, sans-serif;\n}\n\n.fluid-type h2 {\n  margin: 0 0 0.4em;\n  font-size: clamp(1.5rem, 0.9rem + 6cqi, 3rem);\n  line-height: 1.1;\n}\n\n.fluid-type p {\n  margin: 0;\n  color: #475569;\n  font-size: clamp(0.875rem, 0.8rem + 1cqi, 1.125rem);\n  line-height: 1.5;\n}",
  "features": [
    "container queries"
  ],
  "customProperties": []
}
