tailwindcss-multi-column
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -5,3 +5,3 @@ const _ = require('lodash') | ||
return function ({ addUtilities, config, e }) { | ||
let { counts, widths, rules, variants } = _.defaults(options, { | ||
let { counts, gaps, widths, rules, variants } = _.defaults(options, { | ||
counts: [1, 2, 3], | ||
@@ -21,4 +21,8 @@ rules: { | ||
gaps = _.map(gaps, (gap, name) => ({ | ||
[`.${e(`col-gap${getName(name)}`)}`]: { 'column-gap': gap }, | ||
})) | ||
widths = _.map(widths, (width, name) => ({ | ||
[`.${e(`col-w-${name}`)}`]: { 'column-width': width }, | ||
[`.${e(`col-w${getName(name)}`)}`]: { 'column-width': width }, | ||
})) | ||
@@ -35,2 +39,3 @@ | ||
addUtilities(counts, variants) | ||
addUtilities(gaps, variants) | ||
addUtilities(widths, variants) | ||
@@ -37,0 +42,0 @@ addUtilities(ruleColors, variants) |
{ | ||
"name": "tailwindcss-multi-column", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Multi-Column utilities for Tailwind CSS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,2 +27,7 @@ # Tailwind CSS Multi-Column Plugin | ||
counts: [1, 2], | ||
gaps: { | ||
'sm': '1rem', | ||
'md': '1.5rem', | ||
'lg': '2rem', | ||
}, | ||
widths: { | ||
@@ -54,2 +59,6 @@ 'sm': '120px', | ||
.col-gap-sm { column-gap: 1rem; } | ||
.col-gap-md { column-gap: 1.5rem; } | ||
.col-gap-lg { column-gap: 2rem; } | ||
.col-w-sm { column-width: 120px; } | ||
@@ -85,1 +94,5 @@ .col-w-md { column-width: 240px; } | ||
``` | ||
## Credits | ||
This plugin was inspired by [@LoganDark](https://github.com/LoganDark) and [@codytooker](https://github.com/codytooker) discussion here: https://github.com/tailwindcss/tailwindcss/issues/540 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5865
56
96