{
  "id": "half-bleed-split",
  "name": "Half-Bleed Split",
  "category": "layouts",
  "tags": [
    "split screen",
    "full bleed",
    "container",
    "image edge",
    "hero"
  ],
  "description": "Text stays aligned to the page container while the image half runs all the way to the edge of the screen.",
  "url": "https://copy-css.com/snippets/half-bleed-split",
  "markdown": "https://copy-css.com/snippets/half-bleed-split.md",
  "html": "<section class=\"half-bleed\">\n  <div class=\"half-bleed-text\">\n    <h2>Made for makers</h2>\n    <p>Text keeps to the page grid. The image runs to the edge.</p>\n  </div>\n  <div class=\"half-bleed-media\"></div>\n</section>",
  "css": ".half-bleed {\n  --content: 1100px;\n  --gutter: 24px;\n  display: grid;\n  grid-template-columns:\n    minmax(var(--gutter), 1fr)\n    minmax(0, calc(var(--content) / 2))\n    minmax(0, calc(var(--content) / 2))\n    minmax(var(--gutter), 1fr);\n  align-items: center;\n  font: 16px/1.5 system-ui, sans-serif;\n}\n\n.half-bleed-text {\n  grid-column: 2;\n  padding-right: 10%;\n  color: #44403c;\n}\n\n.half-bleed-text h2 {\n  margin: 0 0 8px;\n  color: #1c1917;\n  font-size: 32px;\n  line-height: 1.1;\n}\n\n.half-bleed-text p {\n  margin: 0;\n}\n\n/* From the middle of the container to the right edge of the screen */\n.half-bleed-media {\n  grid-column: 3 / -1;\n  align-self: stretch;\n  min-height: 360px;\n}\n\n.half-bleed-media img {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n\n@media (max-width: 720px) {\n  .half-bleed {\n    grid-template-columns: var(--gutter) 1fr var(--gutter);\n    row-gap: 24px;\n  }\n\n  .half-bleed-text {\n    padding: 0;\n  }\n\n  .half-bleed-media {\n    grid-column: 1 / -1;\n    min-height: 240px;\n  }\n}",
  "features": [
    "CSS Grid",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--content",
      "value": "1100px"
    },
    {
      "name": "--gutter",
      "value": "24px"
    }
  ]
}
