Skip to content

Commit 486a932

Browse files
committed
updated docs
1 parent defb438 commit 486a932

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,27 @@
99

1010
```js
1111
module.exports = {
12-
// ...
13-
14-
plugins: [
15-
// ...
16-
require('tailwindcss-grid')({
17-
grids: [2, 3, 5, 6, 8, 10, 12],
18-
gaps: {
19-
0: '0',
20-
4: '1rem',
21-
8: '2rem'
22-
},
23-
autoMinWidths: {
24-
'16': '4rem',
25-
'24': '6rem',
26-
'300px': '300px'
27-
},
28-
variants: ['responsive'],
29-
}),
30-
],
12+
// ...
13+
14+
plugins: [
15+
// ...
16+
require('tailwindcss-grid')({
17+
grids: [2, 3, 5, 6, 8, 10, 12],
18+
gaps: {
19+
0: '0',
20+
4: '1rem',
21+
8: '2rem',
22+
'4-x': '1rem',
23+
'4-y': '1rem'
24+
},
25+
autoMinWidths: {
26+
'16': '4rem',
27+
'24': '6rem',
28+
'300px': '300px'
29+
},
30+
variants: ['responsive']
31+
})
32+
]
3133
}
3234
```
3335

@@ -40,7 +42,7 @@ The plugin generates the following sets of classes:
4042
- `.grid` for setting `display: grid` on an element
4143
- `.grid-columns-{size}` for specifying the number of columns in the grid
4244
- `.col-span-{columns}` for specifying how many columns a cell should span
43-
- `.grid-gap-{size}` for specifying the size of the gap between columns/rows
45+
- `.grid-gap-{size}` for specifying the size of the gap between columns/rows, if the name ends with -x or -y grid-[column/row]-gap will be used
4446
- `.grid-automin-{size}` for applying the minimum width of the columns using auto-fit and minmax (the max is 1fr)
4547
- `.col-start-{line}` and `.col-end-{line}` for specifying a cell's start and end grid lines explicitly (useful for reordering cells or leaving gaps)
4648
- `.row-span-{columns}` for specifying how many rows a cell should span

0 commit comments

Comments
 (0)