@lobergdesign/dot-grid 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -45,11 +45,11 @@ Or in your HTML:
45
45
  ### Basic Grid
46
46
 
47
47
  ```html
48
- <div class="wrap">
49
- <div class="row">
50
- <div class="col-12 col-md-6 col-lg-4">Column 1</div>
51
- <div class="col-12 col-md-6 col-lg-4">Column 2</div>
52
- <div class="col-12 col-md-6 col-lg-4">Column 3</div>
48
+ <div class="grid-w">
49
+ <div class="grid-r">
50
+ <div class="grid-c-12 grid-c-md-6 grid-c-lg-4">Column 1</div>
51
+ <div class="grid-c-12 grid-c-md-6 grid-c-lg-4">Column 2</div>
52
+ <div class="grid-c-12 grid-c-md-6 grid-c-lg-4">Column 3</div>
53
53
  </div>
54
54
  </div>
55
55
  ```
@@ -57,7 +57,7 @@ Or in your HTML:
57
57
  ### Fluid/Auto Grid (No Breakpoints Needed!)
58
58
 
59
59
  ```html
60
- <div class="wrap">
60
+ <div class="grid-w">
61
61
  <div class="grid-auto-fit">
62
62
  <div>Card 1</div>
63
63
  <div>Card 2</div>
@@ -73,30 +73,30 @@ Or in your HTML:
73
73
 
74
74
  #### Container
75
75
 
76
- - `.wrap` - Centers content with max-width and responsive padding
76
+ - `.grid-w` - Centers content with max-width and responsive padding
77
77
 
78
78
  #### Grid Container
79
79
 
80
- - `.row` - Creates a 12-column grid container with container query support
80
+ - `.grid-r` - Creates a 12-column grid container with container query support
81
81
 
82
82
  ### Column Classes
83
83
 
84
84
  #### Basic Columns
85
85
 
86
86
  ```html
87
- <div class="col-1">...</div> <!-- Spans 1 column -->
88
- <div class="col-6">...</div> <!-- Spans 6 columns (50%) -->
89
- <div class="col-12">...</div> <!-- Spans 12 columns (100%) -->
87
+ <div class="grid-c-1">...</div> <!-- Spans 1 column -->
88
+ <div class="grid-c-6">...</div> <!-- Spans 6 columns (50%) -->
89
+ <div class="grid-c-12">...</div> <!-- Spans 12 columns (100%) -->
90
90
  ```
91
91
 
92
- All classes from `.col-1` through `.col-12` are available.
92
+ All classes from `.grid-c-1` through `.grid-c-12` are available.
93
93
 
94
94
  #### Container Query Responsive (Modern, Recommended)
95
95
 
96
96
  Responds to the **container width**, not viewport:
97
97
 
98
98
  ```html
99
- <div class="col-12 col-sm-6 col-md-4 col-lg-3">
99
+ <div class="grid-c-12 grid-c-sm-6 grid-c-md-4 grid-c-lg-3">
100
100
  Responsive column
101
101
  </div>
102
102
  ```
@@ -113,7 +113,7 @@ Responds to the **container width**, not viewport:
113
113
  If you need viewport-based responsive behavior instead:
114
114
 
115
115
  ```html
116
- <div class="col-vp-md-6 col-vp-lg-4">
116
+ <div class="grid-c-vp-md-6 grid-c-vp-lg-4">
117
117
  Responds to viewport size
118
118
  </div>
119
119
  ```
@@ -123,7 +123,7 @@ If you need viewport-based responsive behavior instead:
123
123
  #### Start Position
124
124
 
125
125
  ```html
126
- <div class="col-3 col-start-4">
126
+ <div class="grid-c-3 grid-c-start-4">
127
127
  Starts at column 4, spans 3 columns
128
128
  </div>
129
129
  ```
@@ -131,7 +131,7 @@ If you need viewport-based responsive behavior instead:
131
131
  Responsive start positions:
132
132
 
133
133
  ```html
134
- <div class="col-6 col-start-md-7 col-start-lg-4">
134
+ <div class="grid-c-6 grid-c-start-md-7 grid-c-start-lg-4">
135
135
  Different start positions at different sizes
136
136
  </div>
137
137
  ```
@@ -139,25 +139,8 @@ Responsive start positions:
139
139
  ### Gap Utilities
140
140
 
141
141
  ```html
142
- <!-- Different gap sizes -->
143
- <div class="row gap-none">...</div> <!-- No gap -->
144
- <div class="row gap-xs">...</div> <!-- 0.5rem -->
145
- <div class="row gap-sm">...</div> <!-- 1rem -->
146
- <div class="row gap-md">...</div> <!-- clamp(1rem, 2vw, 2rem) - default -->
147
- <div class="row gap-lg">...</div> <!-- 3rem -->
148
- <div class="row gap-xl">...</div> <!-- 4rem -->
149
-
150
- <!-- Directional gaps -->
151
- <div class="row gap-b-none">...</div> <!-- No row gap -->
152
- <div class="row gap-sides-none">...</div> <!-- No column gap -->
153
- ```
154
-
155
- Responsive gaps:
156
-
157
- ```html
158
- <div class="row gap-sm gap-md-lg gap-lg-xl">
159
- Different gaps at different sizes
160
- </div>
142
+ <!-- Remove all gaps -->
143
+ <div class="grid-r no-gap">...</div>
161
144
  ```
162
145
 
163
146
  ### Subgrid
@@ -165,12 +148,12 @@ Responsive gaps:
165
148
  Perfect alignment for nested grids:
166
149
 
167
150
  ```html
168
- <div class="row">
169
- <div class="col-12 row-subgrid">
151
+ <div class="grid-r">
152
+ <div class="grid-c-12 grid-r-subgrid">
170
153
  <!-- These inherit the parent's column tracks -->
171
- <div class="col-4">Aligned 1</div>
172
- <div class="col-4">Aligned 2</div>
173
- <div class="col-4">Aligned 3</div>
154
+ <div class="grid-c-4">Aligned 1</div>
155
+ <div class="grid-c-4">Aligned 2</div>
156
+ <div class="grid-c-4">Aligned 3</div>
174
157
  </div>
175
158
  </div>
176
159
  ```
@@ -199,19 +182,19 @@ Automatically fits as many columns as possible:
199
182
 
200
183
  ```html
201
184
  <!-- Adapts to 2 columns on larger screens -->
202
- <div class="row-fluid-2">
185
+ <div class="grid-r-fluid-2">
203
186
  <div>Item 1</div>
204
187
  <div>Item 2</div>
205
188
  <div>Item 3</div>
206
189
  </div>
207
190
 
208
- <!-- Also available: row-fluid-3, row-fluid-4 -->
191
+ <!-- Also available: grid-r-fluid-3, grid-r-fluid-4 -->
209
192
  ```
210
193
 
211
194
  #### RAM Pattern (Repeat Auto Minmax)
212
195
 
213
196
  ```html
214
- <div class="row-ram" style="--col-min: 250px">
197
+ <div class="grid-r-ram" style="--col-min: 250px">
215
198
  <div>Equal column 1</div>
216
199
  <div>Equal column 2</div>
217
200
  <div>Equal column 3</div>
@@ -220,9 +203,9 @@ Automatically fits as many columns as possible:
220
203
 
221
204
  #### Other Fluid Patterns
222
205
 
223
- - `.row-intrinsic` - Columns size based on content
224
- - `.row-even` - Even columns sharing space equally
225
- - `.row-dense` - Fills gaps in the grid (masonry style)
206
+ - `.grid-r-intrinsic` - Columns size based on content
207
+ - `.grid-r-even` - Even columns sharing space equally
208
+ - `.grid-r-dense` - Fills gaps in the grid (masonry style)
226
209
 
227
210
  ### Content Placement
228
211
 
@@ -230,9 +213,9 @@ Align content within a column:
230
213
 
231
214
  ```html
232
215
  <!-- Pattern: place-{vertical}-{horizontal} -->
233
- <div class="col-6 place-t-l">Top Left</div>
234
- <div class="col-6 place-c-c">Center Center</div>
235
- <div class="col-6 place-b-r">Bottom Right</div>
216
+ <div class="grid-c-6 place-t-l">Top Left</div>
217
+ <div class="grid-c-6 place-c-c">Center Center</div>
218
+ <div class="grid-c-6 place-b-r">Bottom Right</div>
236
219
  ```
237
220
 
238
221
  **Vertical options:** `t` (top), `c` (center), `b` (bottom)
@@ -243,7 +226,7 @@ Align content within a column:
243
226
  For flex-based alignment within columns:
244
227
 
245
228
  ```html
246
- <div class="col-12 justify-between">
229
+ <div class="grid-c-12 justify-between">
247
230
  <span>Left</span>
248
231
  <span>Right</span>
249
232
  </div>
@@ -251,14 +234,6 @@ For flex-based alignment within columns:
251
234
 
252
235
  Available: `.justify-start`, `.justify-end`, `.justify-center`, `.justify-between`, `.justify-around`, `.justify-evenly`
253
236
 
254
- ### Aspect Ratio
255
-
256
- ```html
257
- <div class="col-4 aspect-square">Square</div>
258
- <div class="col-8 aspect-video">16:9 Video</div>
259
- <div class="col-6 aspect-4-3">4:3</div>
260
- ```
261
-
262
237
  ### Display Utilities
263
238
 
264
239
  ```html
@@ -276,17 +251,10 @@ Available: `.justify-start`, `.justify-end`, `.justify-center`, `.justify-betwee
276
251
  ### Sizing Utilities
277
252
 
278
253
  ```html
279
- <div class="col-min">Shrinks to min content</div>
280
- <div class="col-max">Expands to max content</div>
281
- <div class="col-fit">Fits content</div>
282
- <div class="col-auto">Auto-sized</div>
283
- ```
284
-
285
- ### Order
286
-
287
- ```html
288
- <div class="col-6 order-last">Appears last</div>
289
- <div class="col-6 order-first">Appears first</div>
254
+ <div class="grid-c-min">Shrinks to min content</div>
255
+ <div class="grid-c-max">Expands to max content</div>
256
+ <div class="grid-c-fit">Fits content</div>
257
+ <div class="grid-c-auto">Auto-sized</div>
290
258
  ```
291
259
 
292
260
  ## 🎨 Customization
@@ -302,16 +270,12 @@ Override CSS custom properties in your own stylesheet:
302
270
  --grid-columns: 16;
303
271
 
304
272
  /* Change container max width */
305
- --grid-wrap-max-width: 1400px;
306
- --grid-wrap-width: 95vw;
307
-
308
- /* Customize gap scale */
309
- --grid-gap-sm: 0.75rem;
310
- --grid-gap-lg: 4rem;
273
+ --grid-w-max-width: 1400px;
274
+ --grid-w-width: 95vw;
311
275
 
312
276
  /* Customize fluid layouts */
313
277
  --grid-auto-min: 300px; /* For grid-auto-fit */
314
- --col-min-width: 250px; /* For col-fluid */
278
+ --grid-c-min-width: 250px; /* For grid-c-fluid */
315
279
  }
316
280
  ```
317
281
 
@@ -356,13 +320,19 @@ See the `/examples` directory for complete working examples:
356
320
 
357
321
  ### Breaking Changes
358
322
 
359
- 1. **Container queries by default** - Responsive classes now use `@container` instead of `@media`
360
- - **Migration:** Use `.col-vp-{size}-{num}` if you need viewport-based behavior
323
+ 1. **Class names updated** - All core classes have been renamed for better clarity:
324
+ - `.wrap` `.grid-w`
325
+ - `.row` → `.grid-r`
326
+ - `.col-*` → `.grid-c-*`
327
+ - **Migration:** Update all class names in your HTML
328
+
329
+ 2. **Container queries by default** - Responsive classes now use `@container` instead of `@media`
330
+ - **Migration:** Use `.grid-c-vp-{size}-{num}` if you need viewport-based behavior
361
331
 
362
- 2. **Placement utilities fixed** - `align-items: top` → `align-items: start`
332
+ 3. **Placement utilities fixed** - `align-items: top` → `align-items: start`
363
333
  - **Migration:** No action needed, now uses correct CSS values
364
334
 
365
- 3. **New breakpoints** - Added `xxl` (1536px), adjusted `lg` from 1025px to 1024px
335
+ 4. **New breakpoints** - Added `xxl` (1536px), adjusted `lg` from 1025px to 1024px
366
336
  - **Migration:** Update breakpoints in your HTML if using exact pixel values
367
337
 
368
338
  ### New Features (Additive)