JSPM

tailwindcss-print-styles

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q37224F
  • License MIT

conditionally apply styles for printing pages

Package Exports

  • tailwindcss-print-styles
  • tailwindcss-print-styles/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tailwindcss-print-styles) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Tailwind CSS Print Styles

Adds variant to TailwindCSS to handle printable styles

Installation

Add this plugin to your project

# Install using pnpm
pnpm install --save-dev tailwindcss-print-styles

# Install using npm
npm install --save-dev tailwindcss-print-styles

# Install using yarn
yarn install -D tailwindcss-print-styles

Usage

// tailwind.config.js

{
  ...
  plugins: {
    require('tailwindcss-print-styles')
  },

  variants: {
    margin: ['print'], // add the print variant to enable where needed
    display: ['print']
  }
}

Example

<div class="print:hidden" />
<div class="print:mb-0" />