Technical content

Code

A print-safe wrapper for native pre/code content with controlled monospace typography and wrapping that prevents long lines from clipping the page.

Elementef-print-code
CapabilityP0 portable
Maturityimplemented / cross-browser evidence
Pagination ownerBrowser / selected renderer

Capability note. Syntax highlighting is application-owned. Essential meaning must not depend on color alone.

Example 1

Folio markup

Long markup remains selectable text and wraps instead of creating page overflow.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-code>
  <pre><code>&lt;ef-print-section break-before='page'&gt;...&lt;/ef-print-section&gt;</code></pre>
</ef-print-code>
Example 2

F# example

Folio does not require a client-side syntax highlighter.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-code>
  <pre><code>type PrintIntent = Portable | ChromiumMargin | Enhanced</code></pre>
</ef-print-code>
Example 3

Long command

pre-wrap and overflow wrapping protect physical print width.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-code style='--ef-print-code-font-size:.82em'>
  <pre><code>npx --package=@echelon-foundry/repository-operating-system ros verify --json</code></pre>
</ef-print-code>