Browse documentation

Reference / Variants & accessibility

Print, orientation, and pointer

Change presentation for printed output, the shape of the viewport, or the precision of the primary pointer.

Working example

In a print preview the interactive controls disappear. A coarse pointer receives more padding around the disclosure.

HTML
<details class="rounded border p-2 pointer-coarse:p-4 print:hidden">
  <summary class="cursor-pointer">Preview controls</summary>
  <p class="mt-2">Choose your paper stock before printing.</p>
</details>

Class reference

ClassCSS declarations
print:hiddendisplay: none;
print:text-blackcolor: #000;
portrait:flex-colflex-direction: column;
landscape:flex-rowflex-direction: row;
pointer-coarse:p-3padding: 0.75rem;
pointer-fine:p-2padding: 0.5rem;
View full generated CSS
Compiled CSS
@media (orientation: portrait) {
  .portrait\:flex-col {
    flex-direction: column;
  }
}
@media (orientation: landscape) {
  .landscape\:flex-row {
    flex-direction: row;
  }
}
@media print {
  .print\:text-black {
    color: #000;
  }
  .print\:hidden {
    display: none;
  }
}
@media (pointer: coarse) {
  .pointer-coarse\:p-3 {
    padding: 0.75rem;
  }
}
@media (pointer: fine) {
  .pointer-fine\:p-2 {
    padding: 0.5rem;
  }
}