Skip to content

40Q/tailwindcss-font-sizes-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind CSS Font Sizes Matrix

This custom Tailwind css plugin, helps build a matrix of font sizes and breakpoints.

Usage

  1. Install the package in your project
npm install @40q/tailwindcss-font-sizes-matrix

or

yarn add @40q/tailwindcss-font-sizes-matrix
  1. Import the package in your tailwind configuration file.
import { fontSizesMatrix } from "@40q/tailwindcss-font-sizes-matrix";
  1. Disable Tailwind's default font sizes:
  theme: {
    fontSize: {}
  }
  1. Call the function in the plugins array and fill the configuration object. This example will generate the class text-xs.
  plugins: [
    fontSizesMatrix({
      xs: {
        default: {
          fontSize: "0.75rem",
          lineHeight: "1rem",
        },
        md: "0.875rem",
        lg: "1rem"
      }
    })
  ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published