Skip to content

Print Helper Classes

See general Size Helper Classes. Just add the prefix .print- to the helper classes.

Examples:

scss
// sets the widths to 100% only for print
.print-h-width-100
scss
// sets the widths to "auto" only for print
.print-h-width-auto

See general Spacing Documentation. Just add the prefix .print- to the helper classes.

Examples:

scss
// resets all vertical margins _only_ for print
.print-m-y-reset
scss
// xxl-padding on the right _only_ for print
.print-p-r-xxl
html
<div class="h-highlight-block -has-border print-p-reset print-m-r-xxl">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
</div>
<div class="h-highlight-block -has-border print-p-reset print-m-l-xxl">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
</div>

Hide on Print

.print-hide or .hidden-print / .no-print (deprecated)

html
<div class="print-hide h-highlight-block">
  <p>Hide me on print.</p>
</div>

TIP

If the hidden element contains another class .-is-visible or .ha-show/.hp-show/.rb-show (deprecated) it will be visible in print, too.

html
<div class="print-hide -is-visible h-highlight-block">
  <p>Show on print.</p>
</div>

Display on Print

TIP

General helper classes are: .print-visible or .pdf-display (deprecated), which will display the element in the print view (display styles depending on element type),

It's preferred to use more specific classes like: .print-inline, .print-block or .print-inline-block or even .print-flex

html
<div class="print-inline-block">
  Inline on print.
</div>
<div class="print-inline">
  Inline on print.
</div>
  • .print-color-black to display the font in black.
  • .print-no-bg to remove the background-color.
html
<div class="h-bg-color-primary print-no-bg">
  <p class="h-color-white print-color-black">No background-color on print</p>
</div>

.print-no-border to remove a border.

.print-border-top to add a gray border on the top.

.print-border-bottom to add a gray border on the bottom.

html
<div class="h-border-primary-bold print-no-border print-border-bottom">
  <p class="h-color-white print-color-black">No surrounding red border on print, only bottom-border</p>
</div>

Avoid Print Page Break

Use .print-no-page-break to avoid a page-break within the element.

Add a bottom-border to table rows (horizontal border): .print-row-border

html
<table class="c-table print-row-border">
  <tr>
    <td>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </td>
  </tr>
    <tr>
    <td>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </td>
  </tr>
</table>

Add a bottom-right to table columns (vertical border): .print-col-border

html
<table class="c-table print-col-border">
  <tr>
    <td>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </td>
  </tr>
    <tr>
      <td>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
      </td>
    </tr>
</table>