You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the plugin uses the `borderColors` and `borderWidths` properties from the config file to generate the rules classes. You can change that to whatever, just keep in mind if you have a `default` key in both objects, `.column-rule` will set both the `column-rule-color` and `column-rule-width` of the element.
22
+
By default the plugin uses the `borderColor` and `borderWidth` properties from your theme to generate the `columnRuleColor` and `columnRuleWidth` classes. You can change that to whatever, just keep in mind if you have a `default` key in both objects (also `columnRuleStyle`), `.column-rule` will set both the `column-rule-color` and `column-rule-width` of the element.
23
+
24
+
This means you won't be able to use `@apply` with those classes. Let me know if that's an issue for you and we can sort it out.
23
25
24
26
```js
25
-
require('tailwindcss-multi-column')({
26
-
counts: [1, 2],
27
-
gaps: {
28
-
'sm':'1rem',
29
-
'md':'1.5rem',
30
-
'lg':'2rem',
31
-
},
32
-
widths: {
33
-
'sm':'120px',
34
-
'md':'240px',
35
-
'lg':'360px',
36
-
},
37
-
rules: {
38
-
colors: {
39
-
'red':'red',
40
-
'lime':'lime',
41
-
'blue':'blue',
27
+
// tailwind.config.js
28
+
{
29
+
theme: { // defaults to these values
30
+
columnCount: [ 1, 2, 3 ],
31
+
columnGap: { // will fallback to 'gap' || 'gridGap' values
32
+
// sm: '1rem',
33
+
// md: '1.5rem',
34
+
// lg: '2rem',
42
35
},
43
-
widths: {
44
-
default:'1px',
45
-
'sm':'2px',
46
-
'md':'3px',
36
+
columnWidth: {
37
+
// sm: '120px',
38
+
// md: '240px',
39
+
// lg: '360px',
47
40
},
41
+
columnRuleColor:false, // will fallback to `borderColor` values
42
+
columnRuleWidth:false, // will fallback to `borderWidth` values
43
+
columnRuleStyle: [
44
+
'none', 'hidden', 'dotted', 'dashed', 'solid',
45
+
'double', 'groove', 'ridge', 'inset', 'outset',
46
+
],
47
+
columnFill: [ 'auto', 'balance', 'balance-all' ],
48
+
columnSpan: [ 'none', 'all' ],
48
49
},
49
-
variants: [],
50
-
}),
50
+
51
+
variants: { // all the following default to ['responsive']
52
+
columnCount: ['responsive'],
53
+
columnGap: ['responsive'],
54
+
columnWidth: ['responsive'],
55
+
columnRuleColor: ['responsive'],
56
+
columnRuleWidth: ['responsive'],
57
+
columnRuleStyle: ['responsive'],
58
+
columnFill: ['responsive'],
59
+
columnSpan: ['responsive'],
60
+
},
61
+
62
+
plugins: [
63
+
require('tailwindcss-multi-column'), // no options to configure
0 commit comments