@mastors/gridder 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +106 -484
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,592 +1,214 @@
1
1
  # @mastors/gridder
2
2
 
3
- > Complete CSS Grid utility class system for the Mastors ecosystem.
3
+ > Complete CSS Grid utility class system + authoring mixins for the Mastors ecosystem.
4
4
 
5
- [![npm](https://img.shields.io/npm/v/@mastors/gridder.svg)](https://www.npmjs.com/package/@mastors/gridder)
5
+ [![npm version](https://img.shields.io/npm/v/@mastors/gridder.svg)](https://www.npmjs.com/package/@mastors/gridder)
6
6
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](../../LICENSE)
7
- [![sass](https://img.shields.io/badge/requires-sass%20%3E%3D1.80-CC6699.svg)](https://sass-lang.com)
8
-
9
- ---
10
-
11
- ## Table of Contents
12
-
13
- - [Overview](#overview)
14
- - [Installation](#installation)
15
- - [Usage](#usage)
16
- - [Utility Classes](#utility-classes)
17
- - [Display](#display)
18
- - [Grid Template Columns](#grid-template-columns)
19
- - [Grid Template Rows](#grid-template-rows)
20
- - [Grid Template Areas](#grid-template-areas)
21
- - [Grid Auto Flow](#grid-auto-flow)
22
- - [Grid Auto Columns](#grid-auto-columns)
23
- - [Grid Auto Rows](#grid-auto-rows)
24
- - [Column Span](#column-span)
25
- - [Column Start & End](#column-start--end)
26
- - [Row Span](#row-span)
27
- - [Row Start & End](#row-start--end)
28
- - [Grid Column Shorthand](#grid-column-shorthand)
29
- - [Grid Row Shorthand](#grid-row-shorthand)
30
- - [Justify Items](#justify-items)
31
- - [Justify Self](#justify-self)
32
- - [Align Items](#align-items)
33
- - [Align Self](#align-self)
34
- - [Place Items](#place-items)
35
- - [Place Self](#place-self)
36
- - [Gap](#gap)
37
- - [Layout Presets](#layout-presets)
38
- - [Responsive Variants](#responsive-variants)
39
- - [Package Exports](#package-exports)
40
- - [Peer Dependencies](#peer-dependencies)
41
7
 
42
8
  ---
43
9
 
44
10
  ## Overview
45
11
 
46
- `@mastors/gridder` provides a complete set of atomic utility classes for CSS Grid covering grid container setup, explicit and implicit track definitions, item placement, alignment, and named template area layouts. All utilities are generated via the core `generate-utilities()` engine and fully support responsive breakpoint prefixes.
47
-
48
- The package requires `@mastors/core` as a peer dependency and consumes its public API for the generator engine. It produces only utility classes — no reset, no base styles.
12
+ `@mastors/gridder` delivers a full set of CSS Grid utility classes and authoring mixins built on top of `@mastors/core`. Every class has a responsive variant just prefix with a breakpoint key (e.g. `.md:grid-cols-3`).
49
13
 
50
14
  ---
51
15
 
52
16
  ## Installation
53
17
 
54
18
  ```bash
55
- npm install @mastors/gridder @mastors/core sass
19
+ npm install @mastors/gridder @mastors/core
56
20
  # or
57
- pnpm add @mastors/gridder @mastors/core sass
21
+ pnpm add @mastors/gridder @mastors/core
22
+ ```
23
+
24
+ Requires `sass >= 1.80.0`:
25
+
26
+ ```bash
27
+ npm install --save-dev sass
58
28
  ```
59
29
 
60
30
  ---
61
31
 
62
32
  ## Usage
63
33
 
64
- ### Import the full stylesheet
34
+ ### Import the stylesheet
65
35
 
66
36
  ```scss
67
37
  @use "@mastors/core/scss";
68
38
  @use "@mastors/gridder/scss";
69
39
  ```
70
40
 
71
- ### Import a single partial
41
+ Or import only the SCSS source to compile yourself:
72
42
 
73
43
  ```scss
74
- @use "@mastors/gridder/scss/utilities/grid-template-columns";
75
- ```
76
-
77
- ### HTML usage
78
-
79
- ```html
80
- <!-- 3-column grid with gap -->
81
- <div class="grid grid-cols-3 gap-6">
82
- <div class="col-span-2">Wide item</div>
83
- <div>Narrow item</div>
84
- </div>
85
-
86
- <!-- Responsive grid — 1 col on mobile, 2 on md, 3 on lg -->
87
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
88
- <div>Item</div>
89
- <div>Item</div>
90
- <div>Item</div>
91
- </div>
92
-
93
- <!-- Item spanning full width -->
94
- <div class="grid grid-cols-12 gap-4">
95
- <header class="col-span-full">Full-width header</header>
96
- <aside class="col-span-3">Sidebar</aside>
97
- <main class="col-span-9">Content</main>
98
- </div>
44
+ @use "@mastors/gridder/scss/index";
99
45
  ```
100
46
 
101
- ---
102
-
103
- ## Utility Classes
104
-
105
- ### Display
106
-
107
- Sets `display` to a grid context.
108
-
109
- | Class | CSS |
110
- |---|---|
111
- | `.grid` | `display: grid` |
112
- | `.inline-grid` | `display: inline-grid` |
113
-
114
- Both support responsive prefixes.
115
-
116
- ---
117
-
118
- ### Grid Template Columns
119
-
120
- Defines explicit column tracks.
121
-
122
- **Fixed column counts** (each track is `minmax(0, 1fr)`):
123
-
124
- | Class | CSS |
125
- |---|---|
126
- | `.grid-cols-1` | `grid-template-columns: repeat(1, minmax(0, 1fr))` |
127
- | `.grid-cols-2` | `grid-template-columns: repeat(2, minmax(0, 1fr))` |
128
- | `.grid-cols-3` | `grid-template-columns: repeat(3, minmax(0, 1fr))` |
129
- | `.grid-cols-4` | `grid-template-columns: repeat(4, minmax(0, 1fr))` |
130
- | `.grid-cols-5` | `grid-template-columns: repeat(5, minmax(0, 1fr))` |
131
- | `.grid-cols-6` | `grid-template-columns: repeat(6, minmax(0, 1fr))` |
132
- | `.grid-cols-7` | `grid-template-columns: repeat(7, minmax(0, 1fr))` |
133
- | `.grid-cols-8` | `grid-template-columns: repeat(8, minmax(0, 1fr))` |
134
- | `.grid-cols-9` | `grid-template-columns: repeat(9, minmax(0, 1fr))` |
135
- | `.grid-cols-10` | `grid-template-columns: repeat(10, minmax(0, 1fr))` |
136
- | `.grid-cols-11` | `grid-template-columns: repeat(11, minmax(0, 1fr))` |
137
- | `.grid-cols-12` | `grid-template-columns: repeat(12, minmax(0, 1fr))` |
138
-
139
- **Named variants:**
140
-
141
- | Class | CSS |
142
- |---|---|
143
- | `.grid-cols-none` | `grid-template-columns: none` |
144
- | `.grid-cols-subgrid` | `grid-template-columns: subgrid` |
145
- | `.grid-cols-auto` | `grid-template-columns: auto` |
146
- | `.grid-cols-min` | `grid-template-columns: min-content` |
147
- | `.grid-cols-max` | `grid-template-columns: max-content` |
148
- | `.grid-cols-fr` | `grid-template-columns: minmax(0, 1fr)` |
149
-
150
- ---
151
-
152
- ### Grid Template Rows
153
-
154
- Defines explicit row tracks.
155
-
156
- **Fixed row counts:**
157
-
158
- | Class | CSS |
159
- |---|---|
160
- | `.grid-rows-1` | `grid-template-rows: repeat(1, minmax(0, 1fr))` |
161
- | `.grid-rows-2` | `grid-template-rows: repeat(2, minmax(0, 1fr))` |
162
- | `.grid-rows-3` | `grid-template-rows: repeat(3, minmax(0, 1fr))` |
163
- | `.grid-rows-4` | `grid-template-rows: repeat(4, minmax(0, 1fr))` |
164
- | `.grid-rows-5` | `grid-template-rows: repeat(5, minmax(0, 1fr))` |
165
- | `.grid-rows-6` | `grid-template-rows: repeat(6, minmax(0, 1fr))` |
166
-
167
- **Named variants:**
168
-
169
- | Class | CSS |
170
- |---|---|
171
- | `.grid-rows-none` | `grid-template-rows: none` |
172
- | `.grid-rows-subgrid` | `grid-template-rows: subgrid` |
173
- | `.grid-rows-auto` | `grid-template-rows: auto` |
174
- | `.grid-rows-min` | `grid-template-rows: min-content` |
175
- | `.grid-rows-max` | `grid-template-rows: max-content` |
176
- | `.grid-rows-fr` | `grid-template-rows: minmax(0, 1fr)` |
177
-
178
- ---
179
-
180
- ### Grid Template Areas
181
-
182
- Named grid areas cannot be atomic utilities — the area strings are layout-specific. Gridder provides a SCSS mixin API and named placement helpers instead.
183
-
184
- #### SCSS mixin API
47
+ ### Use authoring mixins
185
48
 
186
49
  ```scss
187
- @use "@mastors/gridder/scss/utilities/grid-template-areas" as areas;
188
-
189
- .page-layout {
190
- display: grid;
191
- @include areas.define-areas(
192
- "header header",
193
- "sidebar main",
194
- "footer footer"
50
+ @use "@mastors/core/api" as m;
51
+ @use "@mastors/gridder/scss/mixins" as grid;
52
+
53
+ .layout {
54
+ @include grid.gridder-areas(
55
+ "header header header",
56
+ "sidebar main main",
57
+ "footer footer footer"
195
58
  );
196
- grid-template-columns: 250px 1fr;
197
- grid-template-rows: auto 1fr auto;
59
+ grid-template-columns: 240px 1fr;
60
+ gap: m.spacing(4);
198
61
  }
199
62
 
200
- .my-header { @include areas.area(header); }
201
- .my-sidebar { @include areas.area(sidebar); }
202
- .my-main { @include areas.area(main); }
203
- .my-footer { @include areas.area(footer); }
63
+ .layout__header { @include grid.gridder("header"); }
64
+ .layout__sidebar { @include grid.gridder("sidebar"); }
65
+ .layout__main { @include grid.gridder("main"); }
66
+ .layout__footer { @include grid.gridder("footer"); }
204
67
  ```
205
68
 
206
- #### Named area placement classes
207
-
208
- Assign child elements to their named areas:
209
-
210
- | Class | CSS |
211
- |---|---|
212
- | `.area-header` | `grid-area: header` |
213
- | `.area-nav` | `grid-area: nav` |
214
- | `.area-sidebar` | `grid-area: sidebar` |
215
- | `.area-main` | `grid-area: main` |
216
- | `.area-aside` | `grid-area: aside` |
217
- | `.area-footer` | `grid-area: footer` |
218
-
219
- ---
220
-
221
- ### Grid Auto Flow
222
-
223
- Controls how the auto-placement algorithm fills the grid.
224
-
225
- | Class | CSS |
226
- |---|---|
227
- | `.grid-flow-row` | `grid-auto-flow: row` |
228
- | `.grid-flow-col` | `grid-auto-flow: column` |
229
- | `.grid-flow-dense` | `grid-auto-flow: dense` |
230
- | `.grid-flow-row-dense` | `grid-auto-flow: row dense` |
231
- | `.grid-flow-col-dense` | `grid-auto-flow: column dense` |
232
-
233
- Supports responsive prefixes.
234
-
235
69
  ---
236
70
 
237
- ### Grid Auto Columns
238
-
239
- Sizes implicitly created columns.
240
-
241
- | Class | CSS |
242
- |---|---|
243
- | `.auto-cols-auto` | `grid-auto-columns: auto` |
244
- | `.auto-cols-min` | `grid-auto-columns: min-content` |
245
- | `.auto-cols-max` | `grid-auto-columns: max-content` |
246
- | `.auto-cols-fr` | `grid-auto-columns: minmax(0, 1fr)` |
247
-
248
- ---
249
-
250
- ### Grid Auto Rows
251
-
252
- Sizes implicitly created rows.
253
-
254
- | Class | CSS |
255
- |---|---|
256
- | `.auto-rows-auto` | `grid-auto-rows: auto` |
257
- | `.auto-rows-min` | `grid-auto-rows: min-content` |
258
- | `.auto-rows-max` | `grid-auto-rows: max-content` |
259
- | `.auto-rows-fr` | `grid-auto-rows: minmax(0, 1fr)` |
260
-
261
- ---
262
-
263
- ### Column Span
264
-
265
- Makes an item span multiple columns.
266
-
267
- | Class | CSS |
268
- |---|---|
269
- | `.col-span-1` | `grid-column: span 1 / span 1` |
270
- | `.col-span-2` | `grid-column: span 2 / span 2` |
271
- | … | … |
272
- | `.col-span-12` | `grid-column: span 12 / span 12` |
273
- | `.col-span-full` | `grid-column: 1 / -1` |
274
- | `.col-auto` | `grid-column: auto` |
275
-
276
- ---
277
-
278
- ### Column Start & End
279
-
280
- Explicitly places an item at a grid column line.
281
-
282
- **Start lines** — `.col-start-1` through `.col-start-13`, `.col-start-auto`
283
-
284
- **End lines** — `.col-end-1` through `.col-end-13`, `.col-end-auto`
71
+ ## Package Exports
285
72
 
286
- ```html
287
- <!-- Item starts at line 2 and ends at line 5 -->
288
- <div class="col-start-2 col-end-5">...</div>
73
+ ```json
74
+ {
75
+ ".": "./dist/mastors-gridder.css",
76
+ "./scss": "./scss/index.scss",
77
+ "./scss/*": "./scss/*"
78
+ }
289
79
  ```
290
80
 
291
81
  ---
292
82
 
293
- ### Row Span
83
+ ## Utility Classes
294
84
 
295
- Makes an item span multiple rows.
85
+ ### Display
296
86
 
297
87
  | Class | CSS |
298
88
  |---|---|
299
- | `.row-span-1` | `grid-row: span 1 / span 1` |
300
- | | |
301
- | `.row-span-6` | `grid-row: span 6 / span 6` |
302
- | `.row-span-full` | `grid-row: 1 / -1` |
303
- | `.row-auto` | `grid-row: auto` |
304
-
305
- ---
306
-
307
- ### Row Start & End
308
-
309
- Explicitly places an item at a grid row line.
89
+ | `.grid` | `display: grid` |
90
+ | `.inline-grid` | `display: inline-grid` |
310
91
 
311
- **Start lines** — `.row-start-1` through `.row-start-7`, `.row-start-auto`
92
+ ### Template Columns
312
93
 
313
- **End lines** — `.row-end-1` through `.row-end-7`, `.row-end-auto`
94
+ `.grid-cols-1` through `.grid-cols-12` `.grid-cols-none`
314
95
 
315
96
  ```html
316
- <!-- Item starts at row 1, ends at row 3 -->
317
- <div class="row-start-1 row-end-3">...</div>
97
+ <div class="grid grid-cols-3 md:grid-cols-6">...</div>
318
98
  ```
319
99
 
320
- ---
321
-
322
- ### Grid Column Shorthand
323
-
324
- `grid-column` shorthand placement utilities.
325
-
326
- | Class | CSS |
327
- |---|---|
328
- | `.grid-col-auto` | `grid-column: auto` |
329
- | `.grid-col-1` | `grid-column: 1` |
330
- | … | … |
331
- | `.grid-col-12` | `grid-column: 12` |
332
-
333
- ---
334
-
335
- ### Grid Row Shorthand
336
-
337
- `grid-row` shorthand placement utilities.
100
+ ### Template Rows
338
101
 
339
- | Class | CSS |
340
- |---|---|
341
- | `.grid-row-auto` | `grid-row: auto` |
342
- | `.grid-row-1` | `grid-row: 1` |
343
- | … | … |
344
- | `.grid-row-6` | `grid-row: 6` |
345
-
346
- ---
102
+ `.grid-rows-1` through `.grid-rows-6` `.grid-rows-none`
347
103
 
348
- ### Justify Items
104
+ ### Auto Flow
349
105
 
350
- Aligns all grid items along the **inline axis**.
351
-
352
- | Class | CSS |
353
- |---|---|
354
- | `.justify-items-start` | `justify-items: start` |
355
- | `.justify-items-end` | `justify-items: end` |
356
- | `.justify-items-center` | `justify-items: center` |
357
- | `.justify-items-stretch` | `justify-items: stretch` |
106
+ `.grid-flow-row` `.grid-flow-col` `.grid-flow-dense` `.grid-flow-row-dense` `.grid-flow-col-dense`
358
107
 
359
- Supports responsive prefixes.
108
+ ### Auto Columns / Rows
360
109
 
361
- ---
362
-
363
- ### Justify Self
364
-
365
- Aligns a **single** grid item along the inline axis.
366
-
367
- | Class | CSS |
368
- |---|---|
369
- | `.justify-self-auto` | `justify-self: auto` |
370
- | `.justify-self-start` | `justify-self: start` |
371
- | `.justify-self-end` | `justify-self: end` |
372
- | `.justify-self-center` | `justify-self: center` |
373
- | `.justify-self-stretch` | `justify-self: stretch` |
110
+ `.auto-cols-auto` `.auto-cols-min` `.auto-cols-max` `.auto-cols-fr`
111
+ `.auto-rows-auto` `.auto-rows-min` `.auto-rows-max` `.auto-rows-fr`
374
112
 
375
- Supports responsive prefixes.
376
-
377
- ---
378
-
379
- ### Align Items
380
-
381
- Aligns all grid items along the **block axis**.
382
-
383
- | Class | CSS |
384
- |---|---|
385
- | `.items-start` | `align-items: start` |
386
- | `.items-end` | `align-items: end` |
387
- | `.items-center` | `align-items: center` |
388
- | `.items-stretch` | `align-items: stretch` |
389
- | `.items-baseline` | `align-items: baseline` |
390
-
391
- Supports responsive prefixes.
392
-
393
- ---
394
-
395
- ### Align Self
113
+ ### Column Span
396
114
 
397
- Aligns a **single** grid item along the block axis.
115
+ `.col-span-1` through `.col-span-12` `.col-span-full` `.col-auto`
398
116
 
399
- | Class | CSS |
400
- |---|---|
401
- | `.self-auto` | `align-self: auto` |
402
- | `.self-start` | `align-self: start` |
403
- | `.self-end` | `align-self: end` |
404
- | `.self-center` | `align-self: center` |
405
- | `.self-stretch` | `align-self: stretch` |
406
- | `.self-baseline` | `align-self: baseline` |
407
-
408
- Supports responsive prefixes.
117
+ ### Row Span
409
118
 
410
- ---
119
+ `.row-span-1` through `.row-span-6` `.row-span-full` `.row-auto`
411
120
 
412
- ### Place Items
121
+ ### Column Start / End
413
122
 
414
- Shorthand for `align-items` + `justify-items`.
123
+ `.col-start-1` through `.col-start-13` `.col-start-auto`
124
+ `.col-end-1` through `.col-end-13` `.col-end-auto`
415
125
 
416
- | Class | CSS |
417
- |---|---|
418
- | `.place-items-start` | `place-items: start` |
419
- | `.place-items-end` | `place-items: end` |
420
- | `.place-items-center` | `place-items: center` |
421
- | `.place-items-stretch` | `place-items: stretch` |
126
+ ### Row Start / End
422
127
 
423
- Supports responsive prefixes.
128
+ `.row-start-1` through `.row-start-7` `.row-start-auto`
129
+ `.row-end-1` through `.row-end-7` `.row-end-auto`
424
130
 
425
- ---
131
+ ### Justify Items / Content
426
132
 
427
- ### Place Self
133
+ `.justify-items-start` `.justify-items-end` `.justify-items-center` `.justify-items-stretch`
134
+ `.justify-content-start` `.justify-content-end` `.justify-content-center` `.justify-content-between` `.justify-content-around` `.justify-content-evenly`
428
135
 
429
- Shorthand for `align-self` + `justify-self` on a single item.
136
+ ### Align Items / Content
430
137
 
431
- | Class | CSS |
432
- |---|---|
433
- | `.place-self-auto` | `place-self: auto` |
434
- | `.place-self-start` | `place-self: start` |
435
- | `.place-self-end` | `place-self: end` |
436
- | `.place-self-center` | `place-self: center` |
437
- | `.place-self-stretch` | `place-self: stretch` |
138
+ `.items-start` `.items-end` `.items-center` `.items-stretch` `.items-baseline`
139
+ `.content-start` `.content-end` `.content-center` `.content-between` `.content-around` `.content-evenly` `.content-stretch`
438
140
 
439
- Supports responsive prefixes.
141
+ ### Place Items / Content / Self
440
142
 
441
- ---
143
+ `.place-items-start` `.place-items-center` `.place-items-end` `.place-items-stretch`
144
+ `.place-content-start` `.place-content-center` `.place-content-between` `.place-content-stretch`
145
+ `.place-self-auto` `.place-self-start` `.place-self-center` `.place-self-end` `.place-self-stretch`
442
146
 
443
147
  ### Gap
444
148
 
445
- Gap utilities (`.gap-*`, `.gap-x-*`, `.gap-y-*`) are provided by `@mastors/core` and work for both grid and flex containers. They are available whenever `@mastors/core` is imported.
446
-
447
- ```html
448
- <div class="grid grid-cols-3 gap-6">...</div>
449
- <div class="grid grid-cols-2 gap-x-8 gap-y-4">...</div>
450
- ```
451
-
452
- See the [`@mastors/core` spacing utilities](../core/README.md#utility-classes) for the full scale.
453
-
454
- ---
149
+ `.gap-0` through `.gap-96` (follows the core spacing scale)
150
+ `.gap-x-{n}` `.gap-y-{n}`
455
151
 
456
152
  ### Layout Presets
457
153
 
458
- Gridder ships three ready-made named-area layout classes for common full-page patterns.
154
+ `.grid-sidebar` two-column layout with a 240px sidebar and a `1fr` main area
155
+ `.grid-holy-grail` — three-column holy grail layout
459
156
 
460
- #### Holy Grail
461
-
462
- Header / (nav + main + aside) / footer — three columns, three rows.
463
-
464
- ```html
465
- <div class="layout-holy-grail">
466
- <div class="area-header">Header</div>
467
- <div class="area-nav">Nav</div>
468
- <div class="area-main">Main</div>
469
- <div class="area-aside">Aside</div>
470
- <div class="area-footer">Footer</div>
471
- </div>
472
- ```
157
+ ---
473
158
 
474
- Grid template: `"header header header" / "nav main aside" / "footer footer footer"`, columns `auto 1fr auto`.
159
+ ## Authoring Mixins
475
160
 
476
- #### Sidebar
161
+ ### `gridder($area, $col-start?, $col-end?, $row-start?, $row-end?, $align-self?, $justify-self?)`
477
162
 
478
- Two-column: fixed-width sidebar + fluid main area.
163
+ Place an element in a named grid area or via explicit line numbers.
479
164
 
480
- ```html
481
- <div class="layout-sidebar">
482
- <div class="area-sidebar">Sidebar</div>
483
- <div class="area-main">Content</div>
484
- </div>
165
+ ```scss
166
+ // Named area (grid-template-areas mode)
167
+ @include grid.gridder("sidebar");
168
+
169
+ // Explicit lines
170
+ @include grid.gridder(
171
+ $area: null,
172
+ $col-start: 1,
173
+ $col-end: 3,
174
+ $row-start: 2,
175
+ $row-end: 4,
176
+ $align-self: center,
177
+ $justify-self: stretch
178
+ );
485
179
  ```
486
180
 
487
- Grid template: `"sidebar main"`, columns `auto 1fr`.
488
-
489
- #### Dashboard
181
+ ### `gridder-areas($rows...)`
490
182
 
491
- Header + (sidebar + content) + footer.
183
+ Declare `grid-template-areas` from a variadic list of quoted row strings.
492
184
 
493
- ```html
494
- <div class="layout-dashboard">
495
- <div class="area-header">Header</div>
496
- <div class="area-sidebar">Sidebar</div>
497
- <div class="area-content">Content</div>
498
- <div class="area-footer">Footer</div>
499
- </div>
185
+ ```scss
186
+ @include grid.gridder-areas(
187
+ "header header",
188
+ "nav main",
189
+ "footer footer"
190
+ );
500
191
  ```
501
192
 
502
- Grid template: `"header header" / "sidebar content" / "footer footer"`, columns `auto 1fr`.
503
-
504
193
  ---
505
194
 
506
195
  ## Responsive Variants
507
196
 
508
- Every utility marked `responsive: true` generates breakpoint-prefixed variants using the pattern `.{bp}:{class}`.
509
-
510
- **Breakpoints:**
511
-
512
- | Prefix | Min-width |
513
- |---|---|
514
- | *(none)* | 0px (mobile base) |
515
- | `sm:` | 640px |
516
- | `md:` | 768px |
517
- | `lg:` | 1024px |
518
- | `xl:` | 1280px |
519
- | `2xl:` | 1536px |
520
-
521
- **Examples:**
197
+ Every utility class ships a breakpoint-prefixed responsive variant:
522
198
 
523
199
  ```html
524
- <!-- 1 col → 2 col → 3 col as viewport grows -->
525
- <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
526
-
527
- <!-- Switch auto-flow direction on large screens -->
528
- <div class="grid grid-flow-row lg:grid-flow-col">
529
-
530
- <!-- Center items on mobile, stretch on desktop -->
531
- <div class="grid place-items-center lg:place-items-stretch">
532
-
533
- <!-- Item spans full width on mobile, 8/12 on lg -->
534
- <div class="col-span-full lg:col-span-8">
535
- ```
536
-
537
- Utilities with responsive support: `grid` display, `grid-auto-flow`, `justify-items`, `justify-self`, `align-items`, `align-self`, `place-items`, `place-self`.
538
-
539
- ---
540
-
541
- ## Package Exports
542
-
543
- ```json
544
- {
545
- ".": "./dist/mastors-gridder.css",
546
- "./scss": "./scss/index.scss",
547
- "./scss/*": "./scss/*"
548
- }
200
+ <div class="grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">...</div>
201
+ <div class="col-span-full md:col-span-6">...</div>
202
+ <div class="gap-4 xl:gap-8">...</div>
549
203
  ```
550
204
 
551
- ```scss
552
- /* Full gridder stylesheet */
553
- @use "@mastors/gridder/scss";
554
-
555
- /* Individual partial */
556
- @use "@mastors/gridder/scss/utilities/grid-template-columns";
557
-
558
- /* Template areas mixin API */
559
- @use "@mastors/gridder/scss/utilities/grid-template-areas" as areas;
560
- ```
561
-
562
- ---
563
-
564
- ## Peer Dependencies
565
-
566
- | Package | Version |
567
- |---|---|
568
- | `@mastors/core` | `>= 1.0.0` |
569
- | `sass` | `>= 1.80.0` |
205
+ Breakpoints: `sm:` `md:` `lg:` `xl:` `2xl:`
570
206
 
571
207
  ---
572
208
 
573
209
  ## Changelog
574
210
 
575
- ### v1.2.0
576
-
577
- - **Added:** `gridder($area, ...)` mixin — named `grid-area` placement with optional `align-self` / `justify-self` overrides in the same call
578
- - **Added:** `gridder-areas($rows...)` mixin — declare `grid-template-areas` from a variadic list of quoted row strings, co-located with `gridder()` child calls
579
- - **Updated dependency:** `@mastors/core@1.2.0`
580
-
581
- ### v1.1.0
582
-
583
- - Updated dependency: `@mastors/core@1.1.0`
584
-
585
- ### v1.0.0
586
-
587
- - Initial public release — full CSS Grid utility set, layout presets, `generate-utilities()` engine, full responsive breakpoint support
588
-
589
- ---
211
+ See the [root CHANGELOG](../../README.md#changelog).
590
212
 
591
213
  ## License
592
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastors/gridder",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Mastors Gridder — complete CSS Grid utility class system",
5
5
  "license": "MIT",
6
6
  "author": "Mastors Contributors",
@@ -34,8 +34,8 @@
34
34
  "devDependencies": {
35
35
  "rimraf": "^5.0.0",
36
36
  "sass": "^1.80.0",
37
- "@mastors/build-utils": "2.0.0",
38
- "@mastors/sass-config": "1.0.1"
37
+ "@mastors/sass-config": "1.0.1",
38
+ "@mastors/build-utils": "2.0.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@mastors/core": ">=1.0.0",