section

contentAndMediaGroup

Wire value: "contentAndMediaGroup"

Not emitted on any page (see notes above).

1. How swift-docc-render consumes this

Short answer, stated honestly up front: a real, exhaustive grep of swift-docc-render's src/components/ and src/views/ trees (including src/components/Article/, src/components/Tutorial/, src/components/TutorialsOverview/, and src/views/) for the literal string "contentAndMediaGroup" and for the case-insensitive substring contentandmediagroup found zero matches. No Vue component in this renderer dispatches on, imports, or otherwise names this kind. This is not a gap in the search — it reflects the actual state of the swift-docc translator, traced below.

contentAndMediaGroup is declared as a case of RenderSectionKind and backed by a real Swift payload type, ContentAndMediaGroupSection, which wraps an array of the singular ContentAndMediaSection plus a shared layout. It is registered in the decode dispatch table (CodableRenderSection.swift) and in the JSON-diffing machinery (AnyRenderSection.swift), so swift-docc can decode and diff it if a document happens to contain it.

But grepping the full RenderNodeTranslator.swift for ContentAndMediaGroupSection( — the constructor call that would have to run for this kind to ever be emitted — turns up nothing. The translator's actual tutorial-overview path is:

public mutating func visitVolume(_ volume: Volume) -> (any RenderTree)? {
    var volumeSection = VolumeRenderSection(name: volume.name)
    ...
    volumeSection.chapters = volume.chapters.compactMap { visitChapter($0) } as? [VolumeRenderSection.Chapter] ?? []
    return volumeSection
}

public mutating func visitChapter(_ chapter: Chapter) -> (any RenderTree)? {
    ...
    var renderChapter = VolumeRenderSection.Chapter(name: chapter.name)
    renderChapter.content = visitMarkupContainer(chapter.content) as! [RenderBlockContent]
    renderChapter.tutorials = chapter.topicReferences.map { visitTutorialReference($0) } as! [RenderReferenceIdentifier]
    ...
    return renderChapter
}

(RenderNodeTranslator.swift#L504-L536) VolumeRenderSection.Chapter.content is a flat [RenderBlockContent], not a ContentAndMediaGroupSection. Likewise, the singular visitContentAndMedia(_:) — the function that actually constructs ContentAndMediaSection values — is called directly for tutorial-page @Section/@Stack content (RenderNodeTranslator.swift#L1006-L1014), and its results are stored one at a time as TutorialSectionsRenderSection.Section.contentSection (RenderNodeTranslator.swift#L155) — never batched into a contentAndMediaGroup wrapper. In short: contentAndMediaGroup is a decodable-but-dead kind in the current pipeline — present in the enum and in decode/diff plumbing for backward compatibility, but not constructed by any code path that produces new render trees, and consequently never something a current DocC build writes into a .doccarchive, and never something swift-docc-render needs to draw.

Because there is no render-side consumer, this page cannot cite a component, template, or SCSS file for contentAndMediaGroup itself in section 4 below; it instead documents where the closely related, actually-rendered singular contentAndMedia kind is consumed, for context (see the separate contentAndMedia reference page for the full Vue-side treatment).

2. Example JSON and rendered mockup

No real fixture exists anywhere that was searched. DocCArchive's fixtures (ExampleDocs.doccarchive, SampleLibrary.doccarchive) contain no occurrence of contentAndMediaGroup at all (grepped directly, zero hits). swift-docc's test suite (Tests/SwiftDocCTests/) also has no JSON or Swift-literal fixture constructing a ContentAndMediaGroupSection — the one incidental hit in that tree (Utility/NearMissTests.swift) is an unrelated "did-you-mean" string-similarity test, not a fixture. The example below is hand-written to satisfy the Swift model (ContentAndMediaGroupSection + ContentAndMediaSection) exactly, since no JSON Schema for it exists in DocCArchive's vendored spec to check against (see section 3 for why).

{
  "kind": "contentAndMediaGroup",
  "layout": "horizontal",
  "sections": [
    {
      "kind": "contentAndMedia",
      "layout": "horizontal",
      "title": "Attach the sensor",
      "eyebrow": "Step 1",
      "media": "media-attach-sensor",
      "mediaPosition": "trailing",
      "content": [
        {
          "type": "paragraph",
          "inlineContent": [
            { "type": "text", "text": "Mount the accelerometer to the development board." }
          ]
        }
      ]
    },
    {
      "kind": "contentAndMedia",
      "layout": "horizontal",
      "title": "Calibrate the reading",
      "eyebrow": "Step 2",
      "media": "media-calibrate",
      "mediaPosition": "trailing",
      "content": [
        {
          "type": "paragraph",
          "inlineContent": [
            { "type": "text", "text": "Run the calibration routine before recording data." }
          ]
        }
      ]
    }
  ]
}

Step 1 Attach the sensor
Mount the accelerometer to the development board.
[ media-attach-sensor ]

Step 2 Calibrate the reading
Run the calibration routine before recording data.
[ media-calibrate ]

Speculative mockup only: two contentAndMedia entries stacked as this group's model implies, using the sibling ContentAndMedia.vue layout for each entry. No swift-docc-render component actually renders a contentAndMediaGroup wrapper element around them — see section 1.

3. Data sheet

DocCArchive's vendored Sources/DocCArchive/Vendored/RenderNode.spec.json was searched for "contentAndMediaGroup" and for a schema object titled ContentAndMediaGroup: no match exists. The spec defines a ContentAndMedia object (singular kind only; required keys kind/content/media/mediaPosition) but has no corresponding group/wrapper schema. Consistent with that, grepping the generated Sources/DocCArchive/generated/Types.swift for contentAndMediaGroup or ContentAndMediaGroup also returns nothing; the only generated case is case contentAndMedia = "contentAndMedia". There is therefore no doccArchiveType for this kind — DocCArchive cannot decode a contentAndMediaGroup section today; if one appeared in a .doccarchive's render node JSON, the OpenAPI-generated decoder would not recognize it as this specific case (behavior depends on how the surrounding open/undiscriminated section list is typed, but no dedicated struct exists to receive it).

The table below is therefore built from swift-docc's authoring-side Swift model only — it is a description of the payload's shape as swift-docc could still decode/construct it, not a wire-format guarantee, since DocCArchive's schema authority (step 2 of this page's research) has nothing to say about this kind.

FieldTypeRequiredEnum values / defaultNote
kind string yes "contentAndMediaGroup" (fixed) Default-initialized to .contentAndMediaGroup in the Swift struct; not present at all in DocCArchive's vendored JSON Schema.
layout string enum (ContentAndMediaSection.Layout) no "horizontal", "vertical" Derived from the first element of sections at construction time; the memberwise initializer asserts (debug-only) that every section shares the same layout.
sections array of ContentAndMediaSection yes — (precondition: non-empty) The grouped child sections; each is itself a full contentAndMedia-kind payload (own title, eyebrow, content, media, mediaPosition).

Source for the table: ContentAndMediaGroupSection struct at ContentAndMediaGroupSection.swift#L11-L31, cross-checked against Sources/DocCArchive/Vendored/RenderNode.spec.json (no match) and Sources/DocCArchive/generated/Types.swift (no match) as of the pinned commits in the footer.

4. HTML/CSS mapping in DocC-Render output

There is no HTML/CSS mapping to document for contentAndMediaGroup itself: no template, class, id, or SCSS partial in swift-docc-render names or dispatches on this kind (see section 1). There is nothing to map because there is nothing rendered.

For descriptive context only: the individual contentAndMedia sections that this kind would group are, when they occur directly (unwrapped) in tutorial content, rendered by ContentAndMedia.vue as div.content-and-media (with modifier classes media-leading / media-trailing), using SCSS from that component's own <style scoped lang="scss"> block and the shared docc-render/styles/_core.scss partial. See the dedicated contentAndMedia reference page for the full breakdown of that component; none of it is specific to the group wrapper, which simply does not exist on the render side.

DocCArchive transform status: MyHTMLTransformer and MyMarkdownTransformer (documented in Sources/DocCArchive/Documentation.docc/DocCArchive/MyHTMLTransformer.md and MyMarkdownTransformer.md, implemented inline in Sources/DocCArchive/DocCArchive.swift) are still stub placeholders with no kind-specific handling for any render section, and in any case DocCArchive's generated types have no case to represent contentAndMediaGroup for a transformer to switch on.

5. Modern CSS-only alternative

NOT APPLICABLE

Current behavior: there is no current JS/Vue behavior to describe. This kind is not constructed by swift-docc's render-node translator (section 1) and is not consumed by any swift-docc-render component (grepped, zero matches) — there is no interactive, stateful, or even purely presentational behavior in the shipping renderer to hold state for or replace. Its would-be children (individual contentAndMedia sections) are themselves stateless, static flex layouts when they do appear directly (see the contentAndMedia page's own "modern CSS" verdict, also "not applicable," for the same reason at that level).

Naming a native mechanism (<details>, radio+:checked, :target, Popover API, <dialog>, :has(), container queries, anchor positioning, view-transitions) would require a concrete selector or attribute that is actually holding some piece of UI state today, and none exists for a kind that is never emitted or rendered. The honest conclusion is that this kind has nothing to modernize because it has no live implementation to modernize.