{
  "id": "sidebar-layout",
  "name": "Sidebar Layout",
  "category": "layouts",
  "tags": [
    "sidebar",
    "flexbox",
    "responsive",
    "wrap",
    "intrinsic"
  ],
  "description": "A sidebar that sits beside the content and stacks automatically when space runs out.",
  "url": "https://copy-css.com/snippets/sidebar-layout",
  "markdown": "https://copy-css.com/snippets/sidebar-layout.md",
  "html": "<div class=\"with-sidebar\">\n  <div>Sidebar</div>\n  <div>Main content</div>\n</div>",
  "css": ".with-sidebar {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16px;\n}\n\n/* Sidebar: wants to be about 240px wide */\n.with-sidebar > :first-child {\n  flex-basis: 240px;\n  flex-grow: 1;\n}\n\n/* Content: takes the rest, wraps below when narrower than 60% */\n.with-sidebar > :last-child {\n  flex-basis: 0;\n  flex-grow: 999;\n  min-inline-size: 60%;\n}",
  "features": [
    "Flexbox"
  ],
  "customProperties": []
}
