JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6840
  • Score
    100M100P100Q45618F
  • License ISC

Tailwind CSS plugin to generate typography utilities

Package Exports

  • tailwindcss-typography

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-typography) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Typography Plugin for Tailwind CSS

Installation

npm install tailwindcss-typography

Usage

// In your Tailwind CSS config
{
  plugins: [
    require('tailwindcss-typography')({
      indents: {
        '1': '1px',
        '2': '2px',
      },
      textShadows: {
        'default': '0 2px 5px rgba(0, 0, 0, 0.5)',
        'lg': '0 2px 10px rgba(0, 0, 0, 0.5)',
      },
      variants: ['responsive'],
    }),
  ],
}

This plugin generates the following utilities:

.ellipsis {
  text-overflow: ellipsis;
}

.hyphens-none {
  hyphens: none;
}

.hyphens-manual {
  hyphens: manual;
}

.hyphens-auto {
  hyphens: auto;
}

/* configurable with the "indents" option */
.indent-[name] {
  text-indent: [value];
}

/* configurable with the "textShadows" option */
.text-shadow-[name] {
  text-shadow: [value];
}

Note: The textShadows option accepts a default key which generates a simple .text-shadow class (instead of .text-shadow-default).