Configuration

Document-Level Options

All document-level options are specified under the group-html-cell-outputs key. The defaults are shown below:

group-html-cell-outputs:
  - default-container-classes: "cell-output-container"
  - apply-default-styles: true
  - group-by-default: true

default-container-classes

Type: string

The class(es) to apply to the container divs.

Multiple classes should be specified as a single string with the classes delimited by spaces, the same way classes are specified in HTML.

apply-default-styles

Type: boolean

Whether to apply default styles for the cell-output-container.

The default styles add padding and margins, show a scrollbar for overflowing content and undo some of Quarto’s default styles for cell output pre and code elements so that the output container looks a like a single block.

group-by-default

Type: boolean

Whether to group cell outputs by default.

Setting this to true makes the filter “opt-out”; i.e., all cells have their outputs grouped by default — if you want to exclude a cell’s outputs from the filter, you need to specify group-outputs: false in its per-cell options.

Setting this to false makes the filter “opt-in”; i.e., cell outputs are not grouped by default and you need to specify group-outputs: true if you want to group a specific cell’s outputs.

Per-Cell Options

group-outputs

Type: boolean

Whether the cell’s outputs should be grouped.

For example, to disable the filter for a cell (when group-by-default: true is specified in the document-level options):

```{python}
#| group-outputs: false

import sys

for i in range(0, 3):
    print(f"Output stdout {i} " * 10)

for i in range(0, 3):
    print(f"Output stderr {i} " * 10, file=sys.stderr)
```
Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 
Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 
Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 
Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 
Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 
Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 

output-container-classes

Type: string

The classes to apply to the output container. Overrides the document-level default-container-classes option.

In the example below, we apply the custom-output-container class, which adds a border, to the output container.

/* styles.css */
.custom-output-container {
    border: 2px solid;
}
```{python}
#| output-container-classes: "custom-output-container"

import sys

for i in range(0, 3):
    print(f"Output stdout {i} " * 10)

for i in range(0, 3):
    print(f"Output stderr {i} " * 10, file=sys.stderr)
```
Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 Output stdout 0 
Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 Output stdout 1 
Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 Output stdout 2 
Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 Output stderr 0 
Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 Output stderr 1 
Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 Output stderr 2 

Note that output-container-classes overrides the default classes specified in the document-level default-container-classes. Hence, the child output divs retain their original styling (most notably, the padding, margins and horizontal scrollbars) that would otherwise have been adjusted by the default cell-output-container styling.