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
-`grids`, for specifying all of the grid sizes you'd like to generate
14
14
-`gaps`, for specifying the gap sizes you'd like to generate
15
+
-`autoMinWidths` for specifying min width to columns using auto-fit and minmax
15
16
-`variants`, for specifying which variants to generate
16
17
17
18
```js
@@ -27,6 +28,11 @@ module.exports = {
27
28
4:'1rem',
28
29
8:'2rem',
29
30
},
31
+
autoMinWidths: {
32
+
'16':'4rem',
33
+
'24':'6rem',
34
+
'300px':'300px'
35
+
},
30
36
variants: ['responsive'],
31
37
}),
32
38
],
@@ -39,10 +45,12 @@ The plugin generates the following sets of classes:
39
45
40
46
-`.grid`, for setting `display: grid` on an element
41
47
-`.grid-columns-{size}`, for specifying the number of columns in the grid
42
-
-`.grid-gap-{size}`, for specifying the size of the gap between columns/rows
43
48
-`.col-span-{columns}`, for specifying how wide a cell should be
49
+
-`.grid-gap-{size}`, for specifying the size of the gap between columns/rows
50
+
-`.grid-automin-{size}`, for applying the minimum width of the columns using auto-fit and minmax (the max is 1fr)
44
51
-`.col-start-{line}` and `.col-end-{line}`, for specifying a cell's start and end points explicitly (useful for reordering cells or leaving gaps)
45
52
-`.row-span-{columns}`, for specifying how tall a cell should be
46
53
-`.row-start-{line}` and `.row-end-{line}`, for specifying a cell's start and end points explicitly (useful for reordering cells or leaving gaps)
54
+
-`.grid-dense` applies `grid-auto-flow: dense`
47
55
48
56
It's not really practical to expose all of the power of CSS Grid through utilities, but this plugin is a good example of using CSS Grid to replace a cell-only float or Flexbox grid.
0 commit comments