tailwindcss-fraction-widths
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Tailwind CSS fraction width classes

Everyone knows 16 column grids rule. Now you can get them quickly.

npm install tailwindcss-fraction-widths

Then update your tailwind.config.js to use the plugin, passing in your desired number of columns as a Number, or array of Numbers.

// tailwind.config.js
const fractionWidths = require("tailwindcss-fraction-widths");

module.exports = {
  // ... all other config
  plugins: [
    // Will add .w-1/16, .w-2/16, etc
    fractionWidths(16),

    // Will add .w-1/2, .w-2/2, .w-1/7, etc
    fractionWidths([2, 7]),
  ],
};

Package Sidebar

Install

npm i tailwindcss-fraction-widths

Weekly Downloads

321

Version

1.0.2

License

MIT

Unpacked Size

23.5 kB

Total Files

14

Last publish

Collaborators

  • simeongriggs