File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,35 @@ and HTML:
304
304
<div data-bind =" component: {name: 'dashboard-grid', params: $data}" ></div >
305
305
```
306
306
307
+ ## Change grid width
308
+
309
+ To addition to ` width ` option, CSS rules for ` .grid-stack-item[data-gs-width="X"] ` and
310
+ ` .grid-stack-item[data-gs-x="X"] ` have to be changed accordingly (see #38 ).
311
+
312
+ For 3-column grid you need to rewrite CSS to be:
313
+
314
+ ``` css
315
+ .grid-stack-item [data-gs-width = " 3" ] { width : 100% }
316
+ .grid-stack-item [data-gs-width = " 2" ] { width : 66.66666667% }
317
+ .grid-stack-item [data-gs-width = " 1" ] { width : 33.33333333% }
318
+
319
+ .grid-stack-item [data-gs-x = " 2" ] { left : 66.66666667% }
320
+ .grid-stack-item [data-gs-x = " 1" ] { left : 33.33333333% }
321
+ ```
322
+
323
+ For 4-column grid it should be:
324
+
325
+ ``` css
326
+ .grid-stack-item [data-gs-width = " 4" ] { width : 100% }
327
+ .grid-stack-item [data-gs-width = " 3" ] { width : 75% }
328
+ .grid-stack-item [data-gs-width = " 2" ] { width : 50% }
329
+ .grid-stack-item [data-gs-width = " 1" ] { width : 25% }
330
+
331
+ .grid-stack-item [data-gs-x = " 3" ] { left : 75% }
332
+ .grid-stack-item [data-gs-x = " 2" ] { left : 50% }
333
+ .grid-stack-item [data-gs-x = " 1" ] { left : 25% }
334
+ ```
335
+
307
336
308
337
Changes
309
338
=======
You can’t perform that action at this time.
0 commit comments