mastors-gridder 1.0.0 → 1.2.0

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.
package/README.MD CHANGED
@@ -18,19 +18,21 @@ A powerful, flexible, and production-ready SASS grid utility library that provid
18
18
 
19
19
  ---
20
20
 
21
-
22
21
  ## 📋 Table of Contents
23
22
 
24
23
  - [Installation](#-installation)
24
+ - [What's New in v1.2](#-whats-new-in-v12)
25
25
  - [Quick Start](#-quick-start)
26
26
  - [Grid Mixins Overview](#-grid-mixins-overview)
27
27
  - [Quick Reference Table](#-quick-reference-table)
28
28
  - [Detailed Documentation](#-detailed-documentation)
29
+ - [Core Grid Mixins](#core-grid-mixins)
29
30
  - [Responsive Grid Mixins](#responsive-grid-mixins)
30
31
  - [Fixed Grid Mixins](#fixed-grid-mixins)
31
32
  - [Layout Pattern Mixins](#layout-pattern-mixins)
32
33
  - [Grid Item Mixins](#grid-item-mixins)
33
34
  - [Alignment & Utility Mixins](#alignment--utility-mixins)
35
+ - [Advanced Grid Mixins (NEW)](#advanced-grid-mixins-new)
34
36
  - [Usage Examples](#-usage-examples)
35
37
  - [Best Practices](#-best-practices)
36
38
  - [Browser Support](#-browser-support)
@@ -63,13 +65,13 @@ npm i mastors-gridder
63
65
  Then import in your SCSS file:
64
66
 
65
67
  ```scss
66
- @use "mastors-gridder" as *;
68
+ @use "mastors-gridder/mastors-gridder" as *;
67
69
  ```
68
70
 
69
71
  Or with a custom namespace:
70
72
 
71
73
  ```scss
72
- @use "mastors-gridder" as grid;
74
+ @use "mastors-gridder/mastors-gridder" as grid;
73
75
 
74
76
  // Usage: @include grid.grid-auto(250px, 1rem);
75
77
  ```
@@ -84,6 +86,52 @@ Download `_mastors-gridder.scss` and import it:
84
86
 
85
87
  ---
86
88
 
89
+ ## 🎉 What's New in v1.2
90
+
91
+ Version 1.2 brings **20 powerful new mixins** and significant enhancements to the library, expanding from 23 to **43 comprehensive grid mixins**!
92
+
93
+ ### ✨ New Features
94
+
95
+ #### 🔧 Core Grid Setup
96
+ - **`grid-container`** - Simplified grid container initialization
97
+ - **`grid-auto-flow`** - Control auto-placement with dense packing
98
+ - **`grid-auto-rows`** - Set automatic row sizing
99
+ - **`grid-auto-cols`** - Set automatic column sizing
100
+
101
+ #### 📐 Advanced Sizing
102
+ - **`grid-minmax`** - Explicit minmax control with auto-fit/fill
103
+ - **`grid-fr`** - Create grids with explicit fr unit ratios
104
+ - **`grid-intrinsic`** - Use intrinsic sizing (min/max/fit-content)
105
+ - **`grid-explicit`** - Set columns and rows in one mixin
106
+ - **`grid-fit-content`** - Flexible column sizing with fit-content()
107
+ - **`grid-repeat-pattern`** - Repeat custom patterns
108
+ - **`grid-auto-track`** - Flexible auto-fit/fill with custom min/max
109
+
110
+ #### 🎯 Positioning & Layout
111
+ - **`grid-layer`** - Overlay elements across grid tracks
112
+ - **`grid-full-width`** - Span all columns instantly
113
+ - **`grid-full-height`** - Span all rows instantly
114
+ - **`grid-place`** - Concise shorthand for place-items
115
+ - **`grid-place-content`** - Shorthand for place-content
116
+
117
+ #### 📱 Responsive Enhancements
118
+ - **`grid-areas-responsive`** - Responsive grid template areas
119
+ - **`grid-container-aware`** - Container query support
120
+ - **`grid-masonry-modern`** - Improved masonry with dense packing
121
+
122
+ #### 🎨 Content Alignment
123
+ - **`grid-content`** - Align entire grid content (not items)
124
+
125
+ ### 🚀 Key Improvements
126
+
127
+ - **43 Total Mixins** - Nearly doubled the mixin library
128
+ - **Better Performance** - Optimized output with modern CSS features
129
+ - **Enhanced Flexibility** - More granular control over grid behavior
130
+ - **Modern CSS Support** - Container queries, intrinsic sizing, and more
131
+ - **Improved Documentation** - Comprehensive examples for all mixins
132
+
133
+ ---
134
+
87
135
  ## ⚡ Quick Start
88
136
 
89
137
  ```scss
@@ -92,14 +140,24 @@ Download `_mastors-gridder.scss` and import it:
92
140
  @include grid-auto(300px, 2rem);
93
141
  }
94
142
 
143
+ // NEW: Simple container setup
144
+ .wrapper {
145
+ @include grid-container(12, 1rem);
146
+ }
147
+
148
+ // NEW: Explicit minmax control
149
+ .cards {
150
+ @include grid-minmax(200px, 400px, auto-fit, 1rem);
151
+ }
152
+
95
153
  // Fixed 4-column grid
96
154
  .dashboard {
97
155
  @include grid-cols(4, 1.5rem);
98
156
  }
99
157
 
100
- // Sidebar layout
101
- .layout {
102
- @include grid-sidebar(250px, 2rem);
158
+ // NEW: Full-width spanning
159
+ .hero-image {
160
+ @include grid-full-width;
103
161
  }
104
162
 
105
163
  // Centered content
@@ -108,9 +166,9 @@ Download `_mastors-gridder.scss` and import it:
108
166
  min-height: 400px;
109
167
  }
110
168
 
111
- // Span multiple columns
112
- .featured {
113
- @include grid-span(2, 1);
169
+ // NEW: Modern masonry
170
+ .masonry {
171
+ @include grid-masonry-modern(4, 40px, 1rem);
114
172
  }
115
173
  ```
116
174
 
@@ -118,20 +176,57 @@ Download `_mastors-gridder.scss` and import it:
118
176
 
119
177
  ## 🎯 Grid Mixins Overview
120
178
 
121
- | Category | Mixins | Use Case |
122
- | -------------- | ---------------------------------------------------- | ---------------------- |
123
- | **Responsive** | `grid-auto`, `grid-fill`, `grid-cards` | Auto-responsive grids |
124
- | **Fixed** | `grid-cols`, `grid-rows`, `grid-template` | Fixed column/row grids |
125
- | **Layouts** | `grid-sidebar`, `grid-holy-grail`, `grid-full-bleed` | Common layout patterns |
126
- | **Items** | `grid-span`, `grid-area`, `grid-order` | Grid item positioning |
127
- | **Alignment** | `grid-center`, `grid-align`, `grid-self` | Content alignment |
128
- | **Utilities** | `grid-gap`, `grid-dense`, `grid-subgrid` | Special functionality |
179
+ | Category | Count | Mixins |
180
+ | ------------------ | ----- | ------------------------------------------------------------------------------------- |
181
+ | **Core Setup** | 4 | `grid-container`, `grid-auto-flow`, `grid-auto-rows`, `grid-auto-cols` |
182
+ | **Responsive** | 5 | `grid-auto`, `grid-fill`, `grid-cards`, `grid-dense`, `grid-stacked` |
183
+ | **Fixed** | 4 | `grid-cols`, `grid-rows`, `grid-template`, `grid-equal-rows` |
184
+ | **Layouts** | 6 | `grid-sidebar`, `grid-sidebar-responsive`, `grid-holy-grail`, `grid-full-bleed`, etc. |
185
+ | **Items** | 3 | `grid-span`, `grid-area`, `grid-order` |
186
+ | **Alignment** | 5 | `grid-center`, `grid-align`, `grid-self`, `grid-place`, `grid-place-content` |
187
+ | **Advanced** | 11 | `grid-minmax`, `grid-fr`, `grid-intrinsic`, `grid-layer`, `grid-areas-responsive` |
188
+ | **Utilities** | 5 | `grid-gap`, `grid-subgrid`, `grid-full-width`, `grid-full-height`, etc. |
189
+
190
+ **Total: 43 Mixins** 🎉
129
191
 
130
192
  ---
131
193
 
132
194
  ## 📊 Quick Reference Table
133
195
 
134
- Complete list of all mixins with parameters, defaults, and usage examples.
196
+ ### NEW: Core Grid Mixins
197
+
198
+ | Mixin | Parameters | Defaults | Usage Example |
199
+ | ------------------ | --------------------------- | ----------------- | ------------------------------------------- |
200
+ | `grid-container` | `$cols`, `$gap` | `12`, `1rem` | `@include grid-container(12, 1rem);` |
201
+ | `grid-auto-flow` | `$flow`, `$dense` | `row`, `false` | `@include grid-auto-flow(column, true);` |
202
+ | `grid-auto-rows` | `$size` | `auto` | `@include grid-auto-rows(100px);` |
203
+ | `grid-auto-cols` | `$size` | `auto` | `@include grid-auto-cols(200px);` |
204
+ | `grid-content` | `$justify`, `$align` | `center`, `start` | `@include grid-content(center, start);` |
205
+ | `grid-place` | `$value` | `center` | `@include grid-place(center);` |
206
+ | `grid-place-content` | `$value` | `center` | `@include grid-place-content(space-between);` |
207
+
208
+ ### NEW: Advanced Sizing Mixins
209
+
210
+ | Mixin | Parameters | Defaults | Usage Example |
211
+ | ---------------------- | ---------------------------------------- | ------------------------------- | ------------------------------------------------------- |
212
+ | `grid-minmax` | `$min`, `$max`, `$repeat`, `$gap` | `200px`, `1fr`, `auto-fit`, `1rem` | `@include grid-minmax(200px, 400px, auto-fit, 1rem);` |
213
+ | `grid-fr` | `$fr-values...` | required | `@include grid-fr(2fr, 1fr, 1fr);` |
214
+ | `grid-intrinsic` | `$repeat`, `$size`, `$gap` | `auto-fit`, `max-content`, `1rem` | `@include grid-intrinsic(auto-fit, max-content, 0.5rem);` |
215
+ | `grid-explicit` | `$cols`, `$rows`, `$gap` | required, `auto`, `1rem` | `@include grid-explicit(1fr 2fr, auto 200px, 1rem);` |
216
+ | `grid-fit-content` | `$max-width`, `$repeat`, `$gap` | `300px`, `auto-fit`, `1rem` | `@include grid-fit-content(300px, auto-fit, 1rem);` |
217
+ | `grid-repeat-pattern` | `$pattern`, `$count`, `$gap` | required, `3`, `1rem` | `@include grid-repeat-pattern(100px 200px, 3, 1rem);` |
218
+ | `grid-auto-track` | `$repeat`, `$min`, `$max`, `$gap` | `auto-fill`, `200px`, `1fr`, `1rem` | `@include grid-auto-track(auto-fill, 200px, 1fr, 1rem);` |
219
+
220
+ ### NEW: Positioning & Layout Mixins
221
+
222
+ | Mixin | Parameters | Defaults | Usage Example |
223
+ | ------------------------ | ---------------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------- |
224
+ | `grid-layer` | `$col-start`, `$col-end`, `$row-start`, `$row-end` | `1`, `-1`, `1`, `-1` | `@include grid-layer(1, -1, 1, -1);` |
225
+ | `grid-full-width` | none | - | `@include grid-full-width;` |
226
+ | `grid-full-height` | none | - | `@include grid-full-height;` |
227
+ | `grid-areas-responsive` | `$mobile-areas`, `$desktop-areas`, `$breakpoint` | required, required, `768px` | `@include grid-areas-responsive("header" "main", "header header" "sidebar main", 768px);` |
228
+ | `grid-container-aware` | `$min`, `$gap` | `250px`, `1rem` | `@include grid-container-aware(250px, 1rem);` |
229
+ | `grid-masonry-modern` | `$cols`, `$row-gap`, `$col-gap` | `4`, `40px`, `1rem` | `@include grid-masonry-modern(4, 40px, 1rem);` |
135
230
 
136
231
  ### Responsive Grid Mixins
137
232
 
@@ -190,344 +285,376 @@ Complete list of all mixins with parameters, defaults, and usage examples.
190
285
 
191
286
  ## 📖 Detailed Documentation
192
287
 
193
- ### Responsive Grid Mixins
288
+ ### Core Grid Mixins
194
289
 
195
- #### `@mixin grid-auto($min, $gap)`
290
+ #### `@mixin grid-container($cols, $gap)`
196
291
 
197
- Creates a **responsive grid** that automatically fits as many columns as possible based on minimum width.
292
+ **NEW in v1.2** - Simplified grid container initialization with columns and gap.
198
293
 
199
294
  **Parameters:**
200
-
201
- - `$min`: Minimum width per column (default: `250px`)
295
+ - `$cols`: Number of columns (default: `12`)
202
296
  - `$gap`: Gap between items (default: `1rem`)
203
297
 
204
- **Use case:** Image galleries, product cards, any content that should flow naturally
298
+ **Use case:** Quick setup for standard grid containers
205
299
 
206
300
  ```scss
207
- .gallery {
208
- @include grid-auto(300px, 2rem);
301
+ .container {
302
+ @include grid-container(12, 1rem);
209
303
  }
210
304
 
211
305
  // Compiles to:
212
- .gallery {
306
+ .container {
213
307
  display: grid;
214
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
215
- gap: 2rem;
308
+ grid-template-columns: repeat(12, 1fr);
309
+ gap: 1rem;
216
310
  }
217
311
  ```
218
312
 
219
313
  ---
220
314
 
221
- #### `@mixin grid-fill($min, $gap)`
315
+ #### `@mixin grid-auto-flow($flow, $dense)`
222
316
 
223
- Similar to `grid-auto`, but uses `auto-fill` instead of `auto-fit`. Creates **empty columns** if there's extra space.
317
+ **NEW in v1.2** - Controls automatic placement of grid items with optional dense packing.
224
318
 
225
319
  **Parameters:**
320
+ - `$flow`: Flow direction - `row`, `column`, `row dense`, or `column dense` (default: `row`)
321
+ - `$dense`: Enable dense packing algorithm (default: `false`)
226
322
 
227
- - `$min`: Minimum width per column (default: `250px`)
228
- - `$gap`: Gap between items (default: `1rem`)
229
-
230
- **Difference from `grid-auto`:**
231
-
232
- - `auto-fit`: Collapses empty tracks, items stretch to fill space
233
- - `auto-fill`: Keeps empty tracks, items maintain consistent size
323
+ **Use case:** Control how items fill the grid and handle gaps
234
324
 
235
325
  ```scss
236
- .product-grid {
237
- @include grid-fill(280px, 1.5rem);
326
+ .masonry {
327
+ @include grid-auto(250px);
328
+ @include grid-auto-flow(row, true); // Fill gaps densely
329
+ }
330
+
331
+ // Compiles to:
332
+ .masonry {
333
+ display: grid;
334
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
335
+ gap: 1rem;
336
+ grid-auto-flow: row dense;
238
337
  }
239
338
  ```
240
339
 
241
340
  ---
242
341
 
243
- #### `@mixin grid-cards($min, $max, $gap)`
342
+ #### `@mixin grid-auto-rows($size)`
244
343
 
245
- Responsive card grid with **min/max constraints** for better control.
344
+ **NEW in v1.2** - Sets the size of implicitly created rows.
246
345
 
247
346
  **Parameters:**
347
+ - `$size`: Row size (default: `auto`) - Can be `100px`, `minmax(100px, auto)`, `auto`, etc.
248
348
 
249
- - `$min`: Minimum card width (default: `280px`)
250
- - `$max`: Maximum card width (default: `1fr`)
251
- - `$gap`: Gap between cards (default: `1.5rem`)
349
+ **Use case:** Control height of dynamically added rows
252
350
 
253
351
  ```scss
254
- .cards {
255
- @include grid-cards(300px, 400px, 2rem);
352
+ .dynamic-grid {
353
+ @include grid-auto(300px);
354
+ @include grid-auto-rows(150px); // All rows 150px tall
256
355
  }
257
356
  ```
258
357
 
259
358
  ---
260
359
 
261
- ### Fixed Grid Mixins
262
-
263
- #### `@mixin grid-cols($cols, $gap)`
360
+ #### `@mixin grid-auto-cols($size)`
264
361
 
265
- Creates a grid with a **fixed number of columns**.
362
+ **NEW in v1.2** - Sets the size of implicitly created columns.
266
363
 
267
364
  **Parameters:**
365
+ - `$size`: Column size (default: `auto`)
268
366
 
269
- - `$cols`: Number of columns (default: `12`)
270
- - `$gap`: Gap between items (default: `1rem`)
367
+ **Use case:** Control width of dynamically added columns
271
368
 
272
369
  ```scss
273
- .dashboard {
274
- @include grid-cols(4, 1.5rem);
275
- }
276
-
277
- // Compiles to:
278
- .dashboard {
279
- display: grid;
280
- grid-template-columns: repeat(4, 1fr);
281
- gap: 1.5rem;
370
+ .horizontal-scroll {
371
+ @include grid-auto-flow(column);
372
+ @include grid-auto-cols(300px); // Each column 300px wide
282
373
  }
283
374
  ```
284
375
 
285
376
  ---
286
377
 
287
- #### `@mixin grid-rows($rows, $gap)`
378
+ #### `@mixin grid-content($justify, $align)`
288
379
 
289
- Creates a grid with a **fixed number of rows**.
380
+ **NEW in v1.2** - Aligns the entire grid content block (not individual items).
290
381
 
291
382
  **Parameters:**
383
+ - `$justify`: Horizontal alignment (default: `center`) - `start`, `end`, `center`, `stretch`, `space-around`, `space-between`, `space-evenly`
384
+ - `$align`: Vertical alignment (default: `start`) - Same values as justify
292
385
 
293
- - `$rows`: Number of rows (default: `3`)
294
- - `$gap`: Gap between items (default: `1rem`)
386
+ **Use case:** Center or position the entire grid within its container
295
387
 
296
388
  ```scss
297
- .vertical-layout {
298
- @include grid-rows(5, 2rem);
389
+ .centered-grid {
390
+ @include grid-cols(3, 2rem);
391
+ @include grid-content(center, center); // Center entire grid
392
+ height: 100vh;
299
393
  }
300
394
  ```
301
395
 
302
396
  ---
303
397
 
304
- #### `@mixin grid-template($template, $gap)`
398
+ ### Advanced Grid Mixins (NEW)
305
399
 
306
- Creates a grid with **custom column sizes**.
400
+ #### `@mixin grid-minmax($min, $max, $repeat, $gap)`
307
401
 
308
- **Parameters:**
402
+ **NEW in v1.2** - Explicit control over minmax with auto-fit or auto-fill.
309
403
 
310
- - `$template`: CSS grid-template-columns value
404
+ **Parameters:**
405
+ - `$min`: Minimum column width (default: `200px`)
406
+ - `$max`: Maximum column width (default: `1fr`)
407
+ - `$repeat`: `auto-fit` or `auto-fill` (default: `auto-fit`)
311
408
  - `$gap`: Gap between items (default: `1rem`)
312
409
 
410
+ **Use case:** Fine-grained control over responsive column behavior
411
+
313
412
  ```scss
314
- .custom-layout {
315
- @include grid-template(200px 1fr 300px, 2rem);
413
+ .cards {
414
+ @include grid-minmax(200px, 400px, auto-fit, 1rem);
316
415
  }
317
416
 
318
- // Asymmetric layout
319
- .blog {
320
- @include grid-template(2fr 1fr, 1rem);
417
+ // Compiles to:
418
+ .cards {
419
+ display: grid;
420
+ grid-template-columns: repeat(auto-fit, minmax(200px, 400px));
421
+ gap: 1rem;
321
422
  }
322
423
  ```
323
424
 
324
425
  ---
325
426
 
326
- ### Layout Pattern Mixins
327
-
328
- #### `@mixin grid-sidebar($sidebar-width, $gap, $position)`
427
+ #### `@mixin grid-fr($fr-values...)`
329
428
 
330
- Creates a **sidebar + main content** layout.
429
+ **NEW in v1.2** - Create grid with explicit fr unit ratios.
331
430
 
332
431
  **Parameters:**
432
+ - `$fr-values`: Variable number of fr values (required)
333
433
 
334
- - `$sidebar-width`: Width of sidebar (default: `300px`)
335
- - `$gap`: Gap between sidebar and content (default: `1rem`)
336
- - `$position`: `left` or `right` (default: `left`)
434
+ **Use case:** Precise fractional layouts
337
435
 
338
436
  ```scss
339
437
  .layout {
340
- @include grid-sidebar(250px, 2rem, left);
438
+ @include grid-fr(2fr, 1fr, 1fr); // 2:1:1 ratio
341
439
  }
342
440
 
343
- // Right sidebar
344
- .layout-alt {
345
- @include grid-sidebar(300px, 1.5rem, right);
441
+ // Compiles to:
442
+ .layout {
443
+ display: grid;
444
+ grid-template-columns: 2fr 1fr 1fr;
346
445
  }
347
446
  ```
348
447
 
349
448
  ---
350
449
 
351
- #### `@mixin grid-sidebar-responsive($sidebar-width, $gap, $breakpoint)`
450
+ #### `@mixin grid-intrinsic($repeat, $size, $gap)`
352
451
 
353
- Sidebar that **stacks on mobile** and appears side-by-side on larger screens.
452
+ **NEW in v1.2** - Uses intrinsic sizing functions.
354
453
 
355
454
  **Parameters:**
455
+ - `$repeat`: `auto-fit` or `auto-fill` (default: `auto-fit`)
456
+ - `$size`: `min-content`, `max-content`, or `fit-content(300px)` (default: `max-content`)
457
+ - `$gap`: Gap between items (default: `1rem`)
356
458
 
357
- - `$sidebar-width`: Width of sidebar (default: `300px`)
358
- - `$gap`: Gap between elements (default: `1rem`)
359
- - `$breakpoint`: When to switch to sidebar layout (default: `768px`)
459
+ **Use case:** Content-driven column sizes
360
460
 
361
461
  ```scss
362
- .responsive-layout {
363
- @include grid-sidebar-responsive(280px, 1.5rem, 992px);
462
+ .tags {
463
+ @include grid-intrinsic(auto-fit, max-content, 0.5rem);
364
464
  }
465
+
466
+ // Each tag takes only the space it needs
365
467
  ```
366
468
 
367
469
  ---
368
470
 
369
- #### `@mixin grid-holy-grail($sidebar-width, $gap)`
471
+ #### `@mixin grid-explicit($cols, $rows, $gap)`
370
472
 
371
- Classic **Holy Grail layout** (header, sidebar, content, footer).
473
+ **NEW in v1.2** - Set both columns and rows explicitly in one mixin.
372
474
 
373
475
  **Parameters:**
476
+ - `$cols`: Grid template columns (required)
477
+ - `$rows`: Grid template rows (default: `auto`)
478
+ - `$gap`: Gap between items (default: `1rem`)
374
479
 
375
- - `$sidebar-width`: Width of sidebars (default: `250px`)
376
- - `$gap`: Gap between elements (default: `1rem`)
480
+ **Use case:** Complete grid definition in one line
377
481
 
378
482
  ```scss
379
- .page {
380
- @include grid-holy-grail(200px, 1rem);
381
- }
382
-
383
- // HTML structure:
384
- .page {
385
- .header {
386
- grid-area: header;
387
- }
388
- .sidebar-left {
389
- grid-area: sidebar-left;
390
- }
391
- .content {
392
- grid-area: content;
393
- }
394
- .sidebar-right {
395
- grid-area: sidebar-right;
396
- }
397
- .footer {
398
- grid-area: footer;
399
- }
483
+ .dashboard {
484
+ @include grid-explicit(200px 1fr 300px, auto 1fr auto, 1rem);
400
485
  }
401
486
  ```
402
487
 
403
488
  ---
404
489
 
405
- #### `@mixin grid-full-bleed($content-width, $gap)`
490
+ #### `@mixin grid-layer($col-start, $col-end, $row-start, $row-end)`
406
491
 
407
- Grid that allows items to **break out** to full width while keeping content centered.
492
+ **NEW in v1.2** - Overlay elements across the entire grid.
408
493
 
409
494
  **Parameters:**
495
+ - `$col-start`: Starting column (default: `1`)
496
+ - `$col-end`: Ending column (default: `-1`)
497
+ - `$row-start`: Starting row (default: `1`)
498
+ - `$row-end`: Ending row (default: `-1`)
410
499
 
411
- - `$content-width`: Max width of content area (default: `1200px`)
412
- - `$gap`: Gap between items (default: `1rem`)
500
+ **Use case:** Hero sections, overlays, backgrounds
413
501
 
414
502
  ```scss
415
- .article {
416
- @include grid-full-bleed(800px, 2rem);
417
-
418
- > * {
419
- grid-column: 2; // Default content column
420
- }
503
+ .hero {
504
+ @include grid-auto(300px);
505
+ min-height: 500px;
421
506
 
422
- .full-width-image {
423
- grid-column: 1 / -1; // Break out to full width
507
+ .overlay {
508
+ @include grid-layer; // Spans entire grid
509
+ background: rgba(0, 0, 0, 0.5);
424
510
  }
425
511
  }
426
512
  ```
427
513
 
428
514
  ---
429
515
 
430
- #### `@mixin grid-masonry($cols, $gap)`
516
+ #### `@mixin grid-fit-content($max-width, $repeat, $gap)`
431
517
 
432
- Creates a **masonry-style layout** effect.
518
+ **NEW in v1.2** - Flexible column sizing with fit-content().
433
519
 
434
520
  **Parameters:**
435
-
436
- - `$cols`: Number of columns (default: `3`)
521
+ - `$max-width`: Maximum width for fit-content (default: `300px`)
522
+ - `$repeat`: `auto-fit` or `auto-fill` (default: `auto-fit`)
437
523
  - `$gap`: Gap between items (default: `1rem`)
438
524
 
439
- ```scss
440
- .masonry {
441
- @include grid-masonry(4, 1.5rem);
525
+ **Use case:** Flexible content-aware columns with max width
442
526
 
443
- .item {
444
- grid-row-end: span 10; // Adjust based on content height
445
- }
527
+ ```scss
528
+ .navigation {
529
+ @include grid-fit-content(200px, auto-fit, 1rem);
446
530
  }
447
531
  ```
448
532
 
449
533
  ---
450
534
 
451
- ### Grid Item Mixins
452
-
453
- #### `@mixin grid-span($col-span, $row-span)`
535
+ #### `@mixin grid-repeat-pattern($pattern, $count, $gap)`
454
536
 
455
- Makes a grid item **span across multiple columns/rows**.
537
+ **NEW in v1.2** - Repeats a custom column pattern.
456
538
 
457
539
  **Parameters:**
540
+ - `$pattern`: Pattern to repeat (required) - e.g., `100px 200px`
541
+ - `$count`: Number of times to repeat (default: `3`)
542
+ - `$gap`: Gap between items (default: `1rem`)
458
543
 
459
- - `$col-span`: Number of columns to span (default: `1`)
460
- - `$row-span`: Number of rows to span (default: `1`)
544
+ **Use case:** Alternating column widths
461
545
 
462
546
  ```scss
463
- .featured-card {
464
- @include grid-span(2, 1); // Span 2 columns, 1 row
547
+ .alternating {
548
+ @include grid-repeat-pattern(100px 200px, 3, 1rem);
549
+ // Results in: 100px 200px 100px 200px 100px 200px
465
550
  }
551
+ ```
552
+
553
+ ---
554
+
555
+ #### `@mixin grid-areas-responsive($mobile-areas, $desktop-areas, $breakpoint)`
556
+
557
+ **NEW in v1.2** - Responsive grid template areas for different breakpoints.
558
+
559
+ **Parameters:**
560
+ - `$mobile-areas`: Grid areas for mobile (required)
561
+ - `$desktop-areas`: Grid areas for desktop (required)
562
+ - `$breakpoint`: Breakpoint for switching layouts (default: `768px`)
563
+
564
+ **Use case:** Completely different layouts for mobile vs desktop
466
565
 
467
- .large-item {
468
- @include grid-span(3, 2); // Span 3 columns, 2 rows
566
+ ```scss
567
+ .page {
568
+ @include grid-areas-responsive(
569
+ "header"
570
+ "main"
571
+ "sidebar"
572
+ "footer",
573
+ "header header"
574
+ "sidebar main"
575
+ "footer footer",
576
+ 768px
577
+ );
578
+
579
+ .header { grid-area: header; }
580
+ .main { grid-area: main; }
581
+ .sidebar { grid-area: sidebar; }
582
+ .footer { grid-area: footer; }
469
583
  }
470
584
  ```
471
585
 
472
586
  ---
473
587
 
474
- #### `@mixin grid-area($col-start, $col-end, $row-start, $row-end)`
588
+ #### `@mixin grid-container-aware($min, $gap)`
475
589
 
476
- Places item in a **specific grid area**.
590
+ **NEW in v1.2** - Enables container queries for responsive grids.
477
591
 
478
592
  **Parameters:**
593
+ - `$min`: Minimum column width (default: `250px`)
594
+ - `$gap`: Gap between items (default: `1rem`)
479
595
 
480
- - `$col-start`: Starting column line
481
- - `$col-end`: Ending column line
482
- - `$row-start`: Starting row line (default: `auto`)
483
- - `$row-end`: Ending row line (default: `auto`)
596
+ **Use case:** Component that responds to container size, not viewport
484
597
 
485
598
  ```scss
486
- .header {
487
- @include grid-area(1, 4); // Columns 1-4
488
- }
599
+ .card-container {
600
+ container-type: inline-size;
489
601
 
490
- .sidebar {
491
- @include grid-area(1, 2, 2, 4); // Columns 1-2, Rows 2-4
602
+ .cards {
603
+ @include grid-container-aware(250px, 1rem);
604
+ }
492
605
  }
493
606
  ```
494
607
 
495
608
  ---
496
609
 
497
- #### `@mixin grid-order($order)`
610
+ #### `@mixin grid-full-width`
498
611
 
499
- Changes the **visual order** of grid items without changing HTML.
612
+ **NEW in v1.2** - Makes an item span all columns (shorthand for `grid-column: 1 / -1`).
500
613
 
501
- **Parameters:**
614
+ ```scss
615
+ .hero-image {
616
+ @include grid-full-width;
617
+ }
618
+
619
+ // Compiles to:
620
+ .hero-image {
621
+ grid-column: 1 / -1;
622
+ }
623
+ ```
624
+
625
+ ---
626
+
627
+ #### `@mixin grid-full-height`
502
628
 
503
- - `$order`: Order value (default: `0`)
629
+ **NEW in v1.2** - Makes an item span all rows (shorthand for `grid-row: 1 / -1`).
504
630
 
505
631
  ```scss
506
- .first {
507
- @include grid-order(-1); // Appears first
632
+ .sidebar {
633
+ @include grid-full-height;
508
634
  }
509
635
 
510
- .last {
511
- @include grid-order(999); // Appears last
636
+ // Compiles to:
637
+ .sidebar {
638
+ grid-row: 1 / -1;
512
639
  }
513
640
  ```
514
641
 
515
642
  ---
516
643
 
517
- ### Alignment & Utility Mixins
644
+ #### `@mixin grid-place($value)`
518
645
 
519
- #### `@mixin grid-center`
646
+ **NEW in v1.2** - Concise shorthand for `place-items` property.
520
647
 
521
- Centers content **both horizontally and vertically** within a grid cell.
648
+ **Parameters:**
649
+ - `$value`: Alignment value (default: `center`) - `start`, `end`, `center`, `stretch`
522
650
 
523
651
  ```scss
524
- .hero {
525
- @include grid-center;
526
- min-height: 400px;
652
+ .centered {
653
+ @include grid-place(center);
527
654
  }
528
655
 
529
656
  // Compiles to:
530
- .hero {
657
+ .centered {
531
658
  display: grid;
532
659
  place-items: center;
533
660
  }
@@ -535,245 +662,254 @@ Centers content **both horizontally and vertically** within a grid cell.
535
662
 
536
663
  ---
537
664
 
538
- #### `@mixin grid-align($justify, $align)`
665
+ #### `@mixin grid-place-content($value)`
539
666
 
540
- Aligns **all items** in the grid container.
667
+ **NEW in v1.2** - Shorthand for `place-content` property.
541
668
 
542
669
  **Parameters:**
543
-
544
- - `$justify`: Horizontal alignment (default: `center`)
545
- - `$align`: Vertical alignment (default: `center`)
546
-
547
- **Values:** `start`, `end`, `center`, `stretch`
670
+ - `$value`: Alignment value (default: `center`) - `start`, `end`, `center`, `space-between`, `space-around`, `space-evenly`
548
671
 
549
672
  ```scss
550
- .grid {
551
- @include grid-align(start, center);
673
+ .spaced-grid {
674
+ @include grid-place-content(space-between);
552
675
  }
553
676
  ```
554
677
 
555
678
  ---
556
679
 
557
- #### `@mixin grid-self($justify, $align)`
680
+ #### `@mixin grid-masonry-modern($cols, $row-gap, $col-gap)`
558
681
 
559
- Aligns a **single grid item** within its cell.
682
+ **NEW in v1.2** - Improved masonry layout with dense auto-flow.
560
683
 
561
684
  **Parameters:**
685
+ - `$cols`: Number of columns (default: `4`)
686
+ - `$row-gap`: Vertical gap (default: `40px`)
687
+ - `$col-gap`: Horizontal gap (default: `1rem`)
562
688
 
563
- - `$justify`: Horizontal self-alignment (default: `auto`)
564
- - `$align`: Vertical self-alignment (default: `auto`)
689
+ **Use case:** Better Pinterest-style layouts with improved gap packing
565
690
 
566
691
  ```scss
567
- .special-item {
568
- @include grid-self(end, start);
692
+ .pinterest {
693
+ @include grid-masonry-modern(4, 40px, 1rem);
694
+
695
+ .item {
696
+ grid-row-end: span 10; // Base height units
697
+ }
569
698
  }
570
699
  ```
571
700
 
572
701
  ---
573
702
 
574
- #### `@mixin grid-gap($row-gap, $col-gap)`
703
+ #### `@mixin grid-auto-track($repeat, $min, $max, $gap)`
575
704
 
576
- Sets **different gaps** for rows and columns.
705
+ **NEW in v1.2** - Flexible version combining auto-fit/fill with custom min/max.
577
706
 
578
707
  **Parameters:**
708
+ - `$repeat`: `auto-fit` or `auto-fill` (default: `auto-fill`)
709
+ - `$min`: Minimum track size (default: `200px`)
710
+ - `$max`: Maximum track size (default: `1fr`)
711
+ - `$gap`: Gap between items (default: `1rem`)
579
712
 
580
- - `$row-gap`: Vertical gap (default: `1rem`)
581
- - `$col-gap`: Horizontal gap (default: `1rem`)
713
+ **Use case:** Maximum flexibility for responsive grids
582
714
 
583
715
  ```scss
584
- .grid {
585
- @include grid-gap(2rem, 1rem); // More vertical space
716
+ .flexible {
717
+ @include grid-auto-track(auto-fill, 200px, 300px, 1rem);
586
718
  }
587
719
  ```
588
720
 
589
721
  ---
590
722
 
591
- #### `@mixin grid-dense($min, $gap)`
723
+ ### Responsive Grid Mixins
724
+
725
+ #### `@mixin grid-auto($min, $gap)`
592
726
 
593
- Fills gaps by placing items **densely** (useful for varying item sizes).
727
+ Creates a **responsive grid** that automatically fits as many columns as possible based on minimum width.
594
728
 
595
729
  **Parameters:**
596
730
 
597
- - `$min`: Minimum item width (default: `150px`)
731
+ - `$min`: Minimum width per column (default: `250px`)
598
732
  - `$gap`: Gap between items (default: `1rem`)
599
733
 
734
+ **Use case:** Image galleries, product cards, any content that should flow naturally
735
+
600
736
  ```scss
601
- .pinterest-style {
602
- @include grid-dense(200px, 1.5rem);
737
+ .gallery {
738
+ @include grid-auto(300px, 2rem);
739
+ }
740
+
741
+ // Compiles to:
742
+ .gallery {
743
+ display: grid;
744
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
745
+ gap: 2rem;
603
746
  }
604
747
  ```
605
748
 
606
749
  ---
607
750
 
608
- #### `@mixin grid-equal-rows($rows, $gap)`
751
+ #### `@mixin grid-fill($min, $gap)`
609
752
 
610
- Creates rows with **equal height**.
753
+ Similar to `grid-auto`, but uses `auto-fill` instead of `auto-fit`. Creates **empty columns** if there's extra space.
611
754
 
612
755
  **Parameters:**
613
756
 
614
- - `$rows`: Number of rows (default: `3`)
615
- - `$gap`: Gap between rows (default: `1rem`)
757
+ - `$min`: Minimum width per column (default: `250px`)
758
+ - `$gap`: Gap between items (default: `1rem`)
759
+
760
+ **Difference from `grid-auto`:**
761
+
762
+ - `auto-fit`: Collapses empty tracks, items stretch to fill space
763
+ - `auto-fill`: Keeps empty tracks, items maintain consistent size
616
764
 
617
765
  ```scss
618
- .equal-height {
619
- @include grid-equal-rows(4, 1rem);
766
+ .product-grid {
767
+ @include grid-fill(280px, 1.5rem);
620
768
  }
621
769
  ```
622
770
 
623
771
  ---
624
772
 
625
- #### `@mixin grid-subgrid($rows, $cols)`
773
+ #### `@mixin grid-cards($min, $max, $gap)`
626
774
 
627
- Creates a **subgrid** (inherits parent grid lines).
775
+ Responsive card grid with **min/max constraints** for better control.
628
776
 
629
777
  **Parameters:**
630
778
 
631
- - `$rows`: Use subgrid for rows (default: `true`)
632
- - `$cols`: Use subgrid for columns (default: `true`)
779
+ - `$min`: Minimum card width (default: `280px`)
780
+ - `$max`: Maximum card width (default: `1fr`)
781
+ - `$gap`: Gap between cards (default: `1.5rem`)
633
782
 
634
783
  ```scss
635
- .parent {
636
- @include grid-cols(4);
637
- }
638
-
639
- .nested-grid {
640
- @include grid-span(2, 1);
641
- @include grid-subgrid(false, true); // Inherit parent's columns
784
+ .cards {
785
+ @include grid-cards(300px, 400px, 2rem);
642
786
  }
643
787
  ```
644
788
 
645
789
  ---
646
790
 
647
- #### `@mixin grid-stacked($cols, $gap, $breakpoint)`
791
+ ### Fixed Grid Mixins
648
792
 
649
- **Mobile-first stacked grid** that expands on larger screens.
793
+ #### `@mixin grid-cols($cols, $gap)`
794
+
795
+ Creates a grid with a **fixed number of columns**.
650
796
 
651
797
  **Parameters:**
652
798
 
653
- - `$cols`: Number of columns on desktop (default: `2`)
799
+ - `$cols`: Number of columns (default: `12`)
654
800
  - `$gap`: Gap between items (default: `1rem`)
655
- - `$breakpoint`: When to switch to multi-column (default: `640px`)
656
801
 
657
802
  ```scss
658
- .cards {
659
- @include grid-stacked(3, 1.5rem, 768px);
803
+ .dashboard {
804
+ @include grid-cols(4, 1.5rem);
660
805
  }
661
806
  ```
662
807
 
663
808
  ---
664
809
 
665
- #### `@mixin grid-asymmetric($ratio, $gap)`
810
+ #### `@mixin grid-rows($rows, $gap)`
666
811
 
667
- Creates an **asymmetric 2-column layout** with custom ratio.
812
+ Creates a grid with a **fixed number of rows**.
668
813
 
669
814
  **Parameters:**
670
815
 
671
- - `$ratio`: Ratio of first column (default: `2`)
672
- - `$gap`: Gap between columns (default: `1rem`)
816
+ - `$rows`: Number of rows (default: `3`)
817
+ - `$gap`: Gap between items (default: `1rem`)
673
818
 
674
819
  ```scss
675
- .blog-layout {
676
- @include grid-asymmetric(3, 2rem); // 3:1 ratio (main content : sidebar)
820
+ .vertical-layout {
821
+ @include grid-rows(5, 2rem);
677
822
  }
678
823
  ```
679
824
 
680
825
  ---
681
826
 
682
- ## 💡 Usage Examples
827
+ #### `@mixin grid-template($template, $gap)`
683
828
 
684
- ### Responsive Image Gallery
829
+ Creates a grid with **custom column sizes**.
685
830
 
686
- ```scss
687
- .gallery {
688
- @include grid-auto(300px, 2rem);
831
+ **Parameters:**
689
832
 
690
- img {
691
- width: 100%;
692
- height: 100%;
693
- object-fit: cover;
694
- border-radius: 8px;
695
- }
833
+ - `$template`: CSS grid-template-columns value
834
+ - `$gap`: Gap between items (default: `1rem`)
696
835
 
697
- .featured {
698
- @include grid-span(2, 2);
699
- }
836
+ ```scss
837
+ .custom-layout {
838
+ @include grid-template(200px 1fr 300px, 2rem);
700
839
  }
701
840
  ```
702
841
 
703
842
  ---
704
843
 
705
- ### Dashboard Layout
844
+ ## 💡 Usage Examples
845
+
846
+ ### NEW: Modern Hero Section with Overlay
706
847
 
707
848
  ```scss
708
- .dashboard {
709
- @include grid-template(250px 1fr, 1rem);
710
- min-height: 100vh;
849
+ .hero {
850
+ @include grid-container(1, 0);
851
+ min-height: 600px;
711
852
 
712
- .sidebar {
713
- @include grid-center;
714
- background: #f5f5f5;
853
+ .background {
854
+ @include grid-layer; // Spans entire grid
855
+ background: url('hero.jpg') center/cover;
715
856
  }
716
857
 
717
- .main-content {
718
- @include grid-cols(3, 1.5rem);
719
- padding: 2rem;
720
-
721
- .widget {
722
- padding: 1.5rem;
723
- background: white;
724
- border-radius: 8px;
858
+ .overlay {
859
+ @include grid-layer;
860
+ background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6));
861
+ }
725
862
 
726
- &.large {
727
- @include grid-span(2, 1);
728
- }
729
- }
863
+ .content {
864
+ @include grid-layer;
865
+ @include grid-place(center);
866
+ color: white;
867
+ z-index: 2;
730
868
  }
731
869
  }
732
870
  ```
733
871
 
734
872
  ---
735
873
 
736
- ### Blog Layout with Sidebar
874
+ ### NEW: Responsive Grid Template Areas
737
875
 
738
876
  ```scss
739
- .blog {
740
- @include grid-sidebar-responsive(300px, 2rem, 992px);
741
-
742
- .article {
743
- @include grid-rows(auto 1fr auto, 1rem);
744
-
745
- .article-header {
746
- /* ... */
747
- }
748
- .article-content {
749
- /* ... */
750
- }
751
- .article-footer {
752
- /* ... */
753
- }
754
- }
877
+ .app-layout {
878
+ @include grid-areas-responsive(
879
+ "header"
880
+ "nav"
881
+ "main"
882
+ "aside"
883
+ "footer",
884
+ "header header header"
885
+ "nav main aside"
886
+ "footer footer footer",
887
+ 1024px
888
+ );
889
+ min-height: 100vh;
755
890
 
756
- .sidebar {
757
- .widget {
758
- padding: 1.5rem;
759
- margin-bottom: 1rem;
760
- }
761
- }
891
+ .header { grid-area: header; }
892
+ .nav { grid-area: nav; }
893
+ .main { grid-area: main; }
894
+ .aside { grid-area: aside; }
895
+ .footer { grid-area: footer; }
762
896
  }
763
897
  ```
764
898
 
765
899
  ---
766
900
 
767
- ### Card Grid with Dense Packing
901
+ ### NEW: Advanced Card Grid with Custom Sizing
768
902
 
769
903
  ```scss
770
- .products {
771
- @include grid-dense(280px, 1.5rem);
904
+ .product-showcase {
905
+ @include grid-minmax(280px, 350px, auto-fit, 2rem);
906
+ @include grid-auto-flow(row, true); // Dense packing
907
+ @include grid-auto-rows(minmax(200px, auto));
772
908
 
773
- .product-card {
909
+ .card {
774
910
  background: white;
775
- border-radius: 8px;
776
- padding: 1rem;
911
+ border-radius: 12px;
912
+ padding: 1.5rem;
777
913
 
778
914
  &.featured {
779
915
  @include grid-span(2, 2);
@@ -781,8 +917,8 @@ Creates an **asymmetric 2-column layout** with custom ratio.
781
917
  color: white;
782
918
  }
783
919
 
784
- &.sale {
785
- @include grid-span(1, 2);
920
+ &.tall {
921
+ grid-row-end: span 2;
786
922
  }
787
923
  }
788
924
  }
@@ -790,314 +926,267 @@ Creates an **asymmetric 2-column layout** with custom ratio.
790
926
 
791
927
  ---
792
928
 
793
- ### Full-Width Content Sections
929
+ ### NEW: Container-Aware Component
794
930
 
795
931
  ```scss
796
- .article {
797
- @include grid-full-bleed(800px, 2rem);
798
-
799
- h1,
800
- p,
801
- ul {
802
- grid-column: 2; // Content column
803
- }
932
+ .widget-container {
933
+ container-type: inline-size;
934
+ padding: 2rem;
804
935
 
805
- .full-width-image {
806
- grid-column: 1 / -1; // Break out to full width
807
- width: 100%;
808
- height: 500px;
809
- object-fit: cover;
810
- }
936
+ .widgets {
937
+ @include grid-container-aware(250px, 1rem);
811
938
 
812
- .highlight-box {
813
- grid-column: 1 / -1;
814
- background: #f0f0f0;
815
- padding: 2rem;
816
- text-align: center;
939
+ .widget {
940
+ background: white;
941
+ padding: 1rem;
942
+ border-radius: 8px;
943
+ }
817
944
  }
818
945
  }
819
946
  ```
820
947
 
821
948
  ---
822
949
 
823
- ### Responsive Navigation
950
+ ### Responsive Image Gallery
824
951
 
825
952
  ```scss
826
- .nav {
827
- @include grid-stacked(4, 1rem, 768px);
953
+ .gallery {
954
+ @include grid-auto(300px, 2rem);
828
955
 
829
- a {
830
- @include grid-center;
831
- padding: 1rem;
832
- text-decoration: none;
956
+ img {
957
+ width: 100%;
958
+ height: 100%;
959
+ object-fit: cover;
960
+ border-radius: 8px;
961
+ }
833
962
 
834
- &:hover {
835
- background: #f0f0f0;
836
- }
963
+ .featured {
964
+ @include grid-span(2, 2);
837
965
  }
838
966
  }
839
967
  ```
840
968
 
841
969
  ---
842
970
 
843
- ### Holy Grail Layout
844
-
845
- ```scss
846
- .page-layout {
847
- @include grid-holy-grail(200px, 1rem);
971
+ ## Best Practices
848
972
 
849
- .header {
850
- grid-area: header;
851
- @include grid-center;
852
- background: #333;
853
- color: white;
854
- padding: 1rem;
855
- }
973
+ ### 1. **Use the Right Mixin for Your Needs**
856
974
 
857
- .sidebar-left {
858
- grid-area: sidebar-left;
859
- background: #f5f5f5;
860
- }
975
+ ```scss
976
+ // ✅ For dynamic content that should flow
977
+ .gallery {
978
+ @include grid-auto(300px);
979
+ }
861
980
 
862
- .content {
863
- grid-area: content;
864
- @include grid-auto(300px, 1.5rem);
865
- }
981
+ // ✅ For fixed layouts
982
+ .dashboard {
983
+ @include grid-cols(4);
984
+ }
866
985
 
867
- .sidebar-right {
868
- grid-area: sidebar-right;
869
- background: #f5f5f5;
870
- }
986
+ // ✅ NEW: For precise control
987
+ .custom {
988
+ @include grid-minmax(200px, 400px, auto-fit);
989
+ }
871
990
 
872
- .footer {
873
- grid-area: footer;
874
- @include grid-center;
875
- background: #222;
876
- color: white;
877
- padding: 2rem;
878
- }
991
+ // ✅ NEW: For content-driven sizing
992
+ .tags {
993
+ @include grid-intrinsic(auto-fit, max-content);
879
994
  }
880
995
  ```
881
996
 
882
997
  ---
883
998
 
884
- ## Best Practices
885
-
886
- ### 1. **Choose the Right Mixin**
887
-
888
- - Use `grid-auto()` for **content that should flow naturally** (galleries, products)
889
- - Use `grid-cols()` for **fixed layouts** (dashboards, forms)
890
- - Use `grid-sidebar()` for **classic two-column layouts**
891
- - Use `grid-template()` for **precise control** over column sizes
892
-
893
- ---
894
-
895
- ### 2. **Mobile-First Approach**
896
-
897
- Start with mobile styles and use responsive mixins to adapt:
999
+ ### 2. **Combine New Mixins for Power**
898
1000
 
899
1001
  ```scss
900
- .cards {
901
- // Mobile: 1 column
902
- @include grid-cols(1, 1rem);
1002
+ .advanced-grid {
1003
+ @include grid-container(12, 1rem);
1004
+ @include grid-auto-flow(row, true); // Dense packing
1005
+ @include grid-auto-rows(minmax(100px, auto));
903
1006
 
904
- @media (min-width: 768px) {
905
- // Tablet: 2 columns
906
- @include grid-cols(2, 1.5rem);
1007
+ .item {
1008
+ @include grid-self(center, start);
907
1009
  }
908
1010
 
909
- @media (min-width: 1024px) {
910
- // Desktop: auto-responsive
911
- @include grid-auto(300px, 2rem);
1011
+ .full-width {
1012
+ @include grid-full-width;
912
1013
  }
913
1014
  }
914
1015
  ```
915
1016
 
916
1017
  ---
917
1018
 
918
- ### 3. **Consistent Gap Values**
919
-
920
- Define gap variables for consistency:
1019
+ ### 3. **Mobile-First with New Features**
921
1020
 
922
1021
  ```scss
923
- $gap-sm: 0.5rem;
924
- $gap-md: 1rem;
925
- $gap-lg: 1.5rem;
926
- $gap-xl: 2rem;
1022
+ .responsive-cards {
1023
+ // Mobile: Stack
1024
+ @include grid-container(1, 1rem);
1025
+
1026
+ @media (min-width: 640px) {
1027
+ // Tablet: 2 columns
1028
+ @include grid-cols(2, 1rem);
1029
+ }
927
1030
 
928
- .grid {
929
- @include grid-auto(300px, $gap-lg);
1031
+ @media (min-width: 1024px) {
1032
+ // Desktop: Auto-responsive with minmax control
1033
+ @include grid-minmax(280px, 350px, auto-fit, 2rem);
1034
+ }
930
1035
  }
931
1036
  ```
932
1037
 
933
1038
  ---
934
1039
 
935
- ### 4. **Semantic Class Names**
936
-
937
- Use descriptive class names that explain purpose:
1040
+ ### 4. **Use New Alignment Shortcuts**
938
1041
 
939
1042
  ```scss
940
- // ✅ Good
941
- .product-grid {
942
- @include grid-auto(280px);
943
- }
944
- .article-layout {
945
- @include grid-sidebar(300px);
1043
+ // ✅ NEW: Concise centering
1044
+ .hero {
1045
+ @include grid-place(center);
1046
+ min-height: 400px;
946
1047
  }
947
1048
 
948
- // Avoid
949
- .grid-1 {
950
- @include grid-auto(280px);
1049
+ // NEW: Content alignment
1050
+ .spaced {
1051
+ @include grid-cols(3);
1052
+ @include grid-place-content(space-between);
951
1053
  }
952
- .layout-2 {
953
- @include grid-sidebar(300px);
954
- }
955
- ```
956
-
957
- ---
958
-
959
- ### 5. **Combine Mixins Thoughtfully**
960
-
961
- ```scss
962
- .complex-layout {
963
- @include grid-sidebar(250px, 2rem);
964
-
965
- .sidebar {
966
- @include grid-rows(auto 1fr auto);
967
- }
968
1054
 
969
- .main-content {
970
- @include grid-auto(300px, 1.5rem);
971
-
972
- .featured {
973
- @include grid-span(2, 1);
974
- }
975
- }
1055
+ // ✅ NEW: Grid content positioning
1056
+ .centered-grid {
1057
+ @include grid-cols(3);
1058
+ @include grid-content(center, center);
1059
+ height: 100vh;
976
1060
  }
977
1061
  ```
978
1062
 
979
1063
  ---
980
1064
 
981
- ### 6. **Test Responsiveness**
982
-
983
- Always test with:
1065
+ ## 🌐 Browser Support
984
1066
 
985
- - Different screen sizes (mobile, tablet, desktop)
986
- - Different content amounts (1 item, 10 items, 100 items)
987
- - Different item sizes (varying heights, widths)
1067
+ - **Modern Browsers:** Chrome 57+, Firefox 52+, Safari 10.1+, Edge 16+
1068
+ - **CSS Grid:** 96%+ global support
1069
+ - **Subgrid:** Chrome 117+, Firefox 71+, Safari 16+
1070
+ - **Container Queries:** Chrome 105+, Firefox 110+, Safari 16+
1071
+ - **place-items/place-content:** Chrome 59+, Firefox 45+, Safari 11+
988
1072
 
989
1073
  ---
990
1074
 
991
- ### 7. **Use Subgrid When Appropriate**
1075
+ ## 📋 Changelog
992
1076
 
993
- For nested grids that need to align with parent:
1077
+ ### Version 1.2.0
994
1078
 
995
- ```scss
996
- .parent {
997
- @include grid-cols(4);
1079
+ **Released:** January 2, 2026
998
1080
 
999
- .nested {
1000
- @include grid-span(2, 1);
1001
- @include grid-subgrid(false, true); // Align with parent columns
1002
- }
1003
- }
1004
- ```
1081
+ #### 🎉 Major Features
1005
1082
 
1006
- ---
1007
-
1008
- ## 🌐 Browser Support
1083
+ - **20 New Mixins Added** - Expanded from 23 to 43 total mixins
1084
+ - **Enhanced Core Setup** - New container and auto-flow mixins
1085
+ - **Advanced Sizing Controls** - Minmax, fr units, intrinsic sizing
1086
+ - **Modern CSS Support** - Container queries, place properties
1087
+ - **Improved Masonry** - Better dense packing algorithm
1009
1088
 
1010
- - **Modern Browsers:** Chrome 57+, Firefox 52+, Safari 10.1+, Edge 16+
1011
- - **CSS Grid:** 95%+ global support
1012
- - **Subgrid:** Chrome 117+, Firefox 71+, Safari 16+ (use fallbacks for older browsers)
1089
+ #### New Mixins
1013
1090
 
1014
- ---
1091
+ **Core Grid Setup (4 mixins):**
1092
+ - `grid-container` - Simplified grid initialization
1093
+ - `grid-auto-flow` - Control auto-placement with dense packing
1094
+ - `grid-auto-rows` - Set automatic row sizing
1095
+ - `grid-auto-cols` - Set automatic column sizing
1015
1096
 
1016
- ## FAQ
1097
+ **Advanced Sizing (7 mixins):**
1098
+ - `grid-minmax` - Explicit minmax control
1099
+ - `grid-fr` - Explicit fr unit ratios
1100
+ - `grid-intrinsic` - Intrinsic sizing (min/max/fit-content)
1101
+ - `grid-explicit` - Set columns and rows in one mixin
1102
+ - `grid-fit-content` - Flexible fit-content() sizing
1103
+ - `grid-repeat-pattern` - Repeat custom patterns
1104
+ - `grid-auto-track` - Flexible auto-fit/fill with custom min/max
1017
1105
 
1018
- ### Can I use this with Bootstrap or Tailwind?
1106
+ **Layout & Positioning (6 mixins):**
1107
+ - `grid-layer` - Overlay elements across grid
1108
+ - `grid-full-width` - Span all columns shorthand
1109
+ - `grid-full-height` - Span all rows shorthand
1110
+ - `grid-areas-responsive` - Responsive grid template areas
1111
+ - `grid-container-aware` - Container query support
1112
+ - `grid-masonry-modern` - Improved masonry layout
1019
1113
 
1020
- Yes! Mastors-Gridder is framework-agnostic and works alongside any CSS framework. Use it for custom grid layouts where framework utilities fall short.
1114
+ **Alignment (3 mixins):**
1115
+ - `grid-place` - Concise place-items shorthand
1116
+ - `grid-place-content` - place-content shorthand
1117
+ - `grid-content` - Align entire grid content
1021
1118
 
1022
- ---
1119
+ #### 🔧 Improvements
1023
1120
 
1024
- ### Why SCSS mixins instead of CSS classes?
1121
+ - Better documentation with comprehensive examples
1122
+ - More intuitive parameter names and defaults
1123
+ - Enhanced performance with modern CSS features
1124
+ - Improved browser compatibility notes
1125
+ - Extended FAQ section
1025
1126
 
1026
- **Advantages of mixins:**
1127
+ #### 📚 Documentation
1027
1128
 
1028
- - More semantic HTML (no utility class clutter)
1029
- - Greater flexibility and customization
1030
- - Better for component-based architecture
1031
- - Compile-time optimizations
1032
- - No CSS bloat from unused classes
1129
+ - Complete quick reference tables for all mixins
1130
+ - Real-world usage examples for new features
1131
+ - Updated best practices section
1132
+ - Enhanced browser support information
1033
1133
 
1034
1134
  ---
1035
1135
 
1036
- ### How do I handle IE11?
1136
+ ### Version 1.0.0
1037
1137
 
1038
- CSS Grid is not fully supported in IE11. Use feature queries:
1138
+ **Released:** December 30, 2025 - Initial Release
1039
1139
 
1040
- ```scss
1041
- .grid {
1042
- display: flex; // Fallback
1043
- flex-wrap: wrap;
1140
+ #### 🎉 Features
1044
1141
 
1045
- @supports (display: grid) {
1046
- @include grid-auto(300px);
1047
- }
1048
- }
1049
- ```
1142
+ - 23 production-ready grid mixins
1143
+ - ⭐ Responsive grid utilities (auto-fit, auto-fill)
1144
+ - ⭐ Common layout patterns (sidebar, holy grail, full-bleed)
1145
+ - ⭐ Grid item positioning mixins (span, area, order)
1146
+ - ⭐ Alignment utilities (center, align, self)
1147
+ - ⭐ Advanced features (subgrid, dense packing, masonry)
1148
+ - ⭐ Comprehensive documentation with real-world examples
1149
+ - ⭐ Mobile-first approach with responsive helpers
1150
+ - ⭐ Zero dependencies, framework-agnostic
1050
1151
 
1051
1152
  ---
1052
1153
 
1053
- ### Can I customize the mixins?
1054
-
1055
- Absolutely! Copy the mixin code and modify parameters, add new features, or create your own custom mixins based on these templates.
1056
-
1057
- ---
1154
+ ## FAQ
1058
1155
 
1059
- ### How do I debug grid layouts?
1156
+ ### What's the difference between v1.0 and v1.2?
1060
1157
 
1061
- Use browser DevTools:
1158
+ Version 1.2 adds **20 powerful new mixins** (nearly doubling the library), introduces modern CSS features like container queries, provides more granular control over grid behavior, and includes enhanced alignment shortcuts and improved masonry layouts.
1062
1159
 
1063
- ```scss
1064
- // Temporary debug styles
1065
- .grid {
1066
- @include grid-auto(300px);
1160
+ ---
1067
1161
 
1068
- > * {
1069
- border: 1px solid red; // Visualize grid items
1070
- }
1071
- }
1072
- ```
1162
+ ### Can I use the new container-aware features?
1073
1163
 
1074
- Or use Firefox Grid Inspector / Chrome Grid Overlay tools.
1164
+ Yes! The `grid-container-aware` mixin uses CSS Container Queries, which are supported in Chrome 105+, Firefox 110+, and Safari 16+. For older browsers, use traditional media queries as a fallback.
1075
1165
 
1076
1166
  ---
1077
1167
 
1078
- ### What's the performance impact?
1168
+ ### Should I use `grid-place` or `grid-center`?
1079
1169
 
1080
- CSS Grid is highly performant and hardware-accelerated. These mixins compile to standard CSS Grid properties with no runtime overhead.
1170
+ - Use `grid-place(center)` when you want concise centering with flexibility
1171
+ - Use `grid-center` when you want explicit centering (clearer intent)
1172
+ - Both compile to the same CSS
1081
1173
 
1082
1174
  ---
1083
1175
 
1084
- ## 📋 Changelog
1176
+ ### How do I migrate from v1.0 to v1.2?
1085
1177
 
1086
- ### Version 1.0.0
1178
+ Version 1.2 is **100% backward compatible**. All v1.0 mixins work identically. Simply update the library and optionally adopt new mixins where they improve your code.
1087
1179
 
1088
- **Released:** December 30, 2025 - Initial Release
1180
+ ---
1089
1181
 
1090
- #### 🎉 Features
1182
+ ### Which new mixins should I learn first?
1091
1183
 
1092
- - 25+ production-ready grid mixins
1093
- - Responsive grid utilities (auto-fit, auto-fill)
1094
- - Common layout patterns (sidebar, holy grail, full-bleed)
1095
- - Grid item positioning mixins (span, area, order)
1096
- - Alignment utilities (center, align, self)
1097
- - Advanced features (subgrid, dense packing, masonry)
1098
- - ⭐ Comprehensive documentation with real-world examples
1099
- - ⭐ Mobile-first approach with responsive helpers
1100
- - ⭐ Zero dependencies, framework-agnostic
1184
+ Start with these high-impact additions:
1185
+ 1. `grid-full-width` / `grid-full-height` - Instant spanning
1186
+ 2. `grid-minmax` - Better responsive control
1187
+ 3. `grid-place` - Concise alignment
1188
+ 4. `grid-layer` - Overlay elements
1189
+ 5. `grid-auto-flow` - Control item placement
1101
1190
 
1102
1191
  ---
1103
1192
 
@@ -1127,4 +1216,5 @@ Found an issue or have a suggestion? Contributions are welcome!
1127
1216
 
1128
1217
  **Maintained by:** [KEHEM-IT](https://github.com/KEHEM-IT)
1129
1218
  **License:** Free to Use
1130
- **Version:** 1.0.0
1219
+ **Current Version:** 1.2.0
1220
+ **Last Updated:** January 2, 2026