Font Sizes for Tailwind CSS
This plugin allows you to quickly generate font sizes in ems.
Requirements
This plugin requires Tailwind CSS 1.2 or later.
Installation
yarn add tailwindcss-font-sizes
Usage
The following plugin options are available. See below how these are passed (via an object) to the plugin in your tailwind.config.js
.
Options Available
Pass along a number value to generate that many font sizes.
// tailwind.config.jsmoduleexports = plugins: // Generates 250 font sizes in ems total: 10 // default format: 'em' // default em (options include: em, rem, px) // startingSize: 8, // default // baseSize: 14, // default ;
The above configuration would generate the following CSS:
/* etc. */
Which you can then use in your HTML like this:
I'm displayed at a font size of 0.7142857142857143 ems
The above depends on the order of the generated CSS.