inline

strong

Wire value: "strong"

Appears on: Documentation Topic, Tutorial (Project), Tutorial Article

1. How swift-docc-render consumes this

Grepping src/components/ and src/views/ for the literal string 'strong' lands entirely inside src/components/ContentNode.vue — there is no dedicated Strong.vue component. The wire constant is declared in the inline-type lookup table:

const InlineType = {
  codeVoice: 'codeVoice',
  emphasis: 'emphasis',
  image: 'image',
  inlineHead: 'inlineHead',
  link: 'link',
  newTerm: 'newTerm',
  reference: 'reference',
  strong: 'strong',
  text: 'text',
  superscript: 'superscript',
  subscript: 'subscript',
  strikethrough: 'strikethrough',
};

(ContentNode.vue#L56-L69.) That constant is matched inside the renderNode() factory function's switch (node.type) dispatch table, sharing its case with the (undocumented-on-the-wire-schema, but still-handled) inlineHead kind:

case InlineType.strong:
case InlineType.inlineHead:
  return createElement('strong', (
    renderChildren(node.inlineContent)
  ));

(ContentNode.vue#L488-L492.) Unlike heading or reference, a strong node is not delegated to a child Vue component at all — it is turned directly into a bare native <strong> element via Vue's createElement render function, with no props and no wrapper class. The node's inlineContent array (its nested inline children — text, links, other emphasis, etc.) is recursively rendered by the shared renderChildren helper, which simply maps each child node back through the same renderNode() dispatcher (ContentNode.vue#L121-L124). The type discriminator itself is consumed only by the switch and never forwarded into the DOM.

ContentNode.vue also exposes tree-walking utility methods (map, forEach, reduce) used elsewhere in the app to recurse over rendered content — for example to build a plain-text index or to find/replace nodes. InlineType.strong appears in both of those switch tables purely so the walker knows to recurse into node.inlineContent for this kind, alongside emphasis, inlineHead, superscript, subscript, strikethrough, and newTerm (ContentNode.vue#L564-L575 and ContentNode.vue#L619-L628). This is bookkeeping, not additional rendering behavior — the actual DOM output is fully determined by the one createElement('strong', ...) call above.

2. Example JSON and rendered mockup

Real fixture: Tests/SwiftDocCTests/Rendering/Rendering Fixtures/term-lists-1.json in the swift-docc repository (pinned commit 8b8d8268aa), field primaryContentSections[0].content[0].items[3].term.inlineContent[0] — a strong node used inside a termList term's inline content, followed by a plain-text sibling node (" term"). No fixture inside DocCArchive's own Tests/DocCArchiveTests/Fixtures/ archives (ExampleDocs.doccarchive, SampleLibrary.doccarchive) contains a real "strong" RenderNode; the only hits there are unrelated occurrences of the string inside bundled third-party JS assets (e.g. syntax-highlighter chunks), not RenderNode JSON data.

{
  "term": {
    "inlineContent": [
      {
        "type": "strong",
        "inlineContent": [
          { "type": "text", "text": "Final" }
        ]
      },
      { "type": "text", "text": " term" }
    ]
  },
  "definition": {
    "content": [
      {
        "type": "paragraph",
        "inlineContent": [
          { "type": "text", "text": "Definition for bold term." }
        ]
      }
    ]
  }
}
Final term
Definition for bold term.

mockup: the strong node's inlineContent ("Final") is rendered as a bare <strong>Final</strong>, immediately followed by the sibling text node (" term") — both are children of the enclosing termList item's <dt>. No wrapper class or component is introduced by the strong kind itself; the bold weight comes entirely from the browser's default strong styling as overridden by DocC-render's global typography rule (see Section 4).

3. Data sheet

Source: Sources/DocCArchive/Vendored/RenderNode.spec.json, schema object #/components/schemas/Strong (lines 1265–1285), cross-checked against Components.Schemas.Strong in Sources/DocCArchive/generated/Types.swift (lines 1714–1740). Strong is one arm (case3) of the RenderInlineContent discriminated union (#/components/schemas/RenderInlineContent, spec line 1190; generated as an indirect enum, lines 1535–1557 of Types.swift), which is decoded as an OpenAPI oneOf — the generated initializer tries each candidate case's init(from:) in declaration order (Text, then Emphasis, then Strong, ...) and keeps the first one that decodes without throwing.

FieldTypeRequiredEnum values / defaultNote
type string yes "strong" (single-value enum) Generated as _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { case strong = "strong" }, decoded/encoded under the Swift property name _type via an explicit CodingKeys mapping (case _type = "type").
inlineContent array of RenderInlineContent yes — (no length constraint; may be empty) Generated as [Components.Schemas.RenderInlineContent]. Holds the nested inline nodes that receive the bold styling — recursively, another strong, emphasis, text, reference, etc. can appear here, matching swift-markdown's ability to nest inline formatting.

Note on schema shape versus the closely related emphasis kind: Emphasis's type field is a two-value enum, ["emphasis", "italic"] (spec lines 1250–1255), a historical alias kept for backward compatibility. Strong has no such alias — its type enum has exactly one member, "strong". There is no equivalent of a "bold" wire alias anywhere in the spec.

On the swift-docc production side (secondary/flavor source, not authoritative for wire shape), the enclosing enum case is case strong(inlineContent: [RenderInlineContent]) (Sources/SwiftDocC/Model/Rendering/Content/RenderInlineContent.swift, line 38, within the public enum RenderInlineContent: Equatable declared at line 32). The doc comment on the enclosing type describes the inline-content model generally: "Apart from simple content like an image or a piece of plain text, a renderer uses inline elements to style content," and gives the illustrative ASCII tree [Paragraph [Text] [Strong [Text]] [Text] [Emphasize [Reference]] ...] (lines 11–28). The case-specific comment is a single line: "A strongly emphasized piece of inline content" (line 37). Codable conformance for this case is hand-written in the same file (not @Codable-synthesized) — the encode(to:)/init(from:) switch statements read/write inlineContent under the shared .inlineContent coding key (lines 93–94 and 144–145), matching the generated wire struct field-for-field. A separate plainText computed property collapses a .strong case to its children's concatenated plain text with no bold marker retained (line 185–186 — return inlineContent.plainText), and RenderBlockContent+Capitalization.swift (lines 20–21) shows the one place swift-docc mutates through a strong node — capitalizing the first word of a sentence that happens to start inside bolded text.

Authoring-side, a strong node is what swift-docc emits for a swift-markdown Strong AST node — i.e. Markdown written with double asterisks or double underscores (**bold text** / __bold text__) — via RenderContentCompiler.visitStrong(_:), which recursively visits the markup node's children and wraps the result in RenderInlineContent.strong(inlineContent:) (Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift, lines 299–301). This mirrors the adjacent visitEmphasis(_:) (lines 295–297) one case above it, confirming strong and emphasis are produced by structurally identical compiler paths, one for bold and one for italic markup.

DocCArchive's own transform layer does not yet do anything with this kind: MyHTMLTransformer and MyMarkdownTransformer (Sources/DocCArchive/DocCArchive.swift, lines 242–254) are still stub placeholders that return a hardcoded HTML comment and an empty string respectively for an entire RenderNode, with no per-inline-kind switch reached yet — so a strong node parsed via Components.Schemas.Strong is available on the decoded model today, but nothing in this repository currently converts it into HTML or Markdown output.

4. HTML/CSS mapping in DocC-Render output

Rendered DOM for a strong node, in context:

No component-scoped SCSS targets strong specifically inside ContentNode.vue's own render path — there is no src/components/ContentNode/Strong.vue and no scoped stylesheet for this kind. The only project-wide rule that touches the native <strong> tag is a global typography default in src/styles/base/_typography.scss:

b,
strong {
  font-weight: $font-weight-semibold;
}

(_typography.scss#L158-L161.) This overrides the browser's default font-weight: bold with the site's own $font-weight-semibold Sass variable, so every strong RenderNode (and every literal <strong>/<b> anywhere else in the app's static templates) renders at a consistent semibold weight rather than the UA-stylesheet's full bold. This is a compiled Sass constant, not a runtime CSS custom property, so it cannot be overridden via ---prefixed theming variables the way many of DocC-render's color tokens can.

Unrelated but worth flagging so it is not mistaken for this kind's styling: there is a second, unrelated &-strong SCSS rule in src/styles/base/_syntax.scss (.token-strong { font-weight: bold; }, under the syntax-highlighter's token-class prefix). That rule styles a highlight.js "strong" token class inside code-listing syntax highlighting — a completely different concern from the RenderInlineContent.strong kind documented on this page, despite the coincidental name.

5. Modern CSS-only alternative

Not applicable

Current behavior in play: the strong kind carries no interactive or stateful behavior at all. ContentNode.vue's handling for it is a single, unconditional createElement('strong', renderChildren(node.inlineContent)) call (ContentNode.vue#L488-L492) — no click handlers, no computed/reactive Vue state, no v-if/v-show branching, and no JavaScript-driven visual state of any kind. The only styling involved is the static, non-conditional font-weight override in _typography.scss (Section 4), which is already plain CSS with nothing to migrate.

There is accordingly no state/behavior for a native HTML mechanism (<details>, radio + :checked, :target, the Popover API, <dialog>, :has(), container queries, anchor positioning, view transitions) to replace — this kind is a pure, stateless text-formatting wrapper, structurally identical in spirit to reading **bold** markup and emitting a <strong> tag. The verdict is "not applicable" because there is nothing interactive here to reproduce, not because a modern CSS feature happens to be a poor fit.