Skip to content

Commit 52c69bc

Browse files
updated column grid to use better margin/padding defaults when using fullwidth grids
1 parent c968dd5 commit 52c69bc

File tree

9 files changed

+83
-69
lines changed

9 files changed

+83
-69
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#The mini Mighty Grid!#
22

3-
**mini Mighty Grid is 3 grids in one. And all at an overhead of only 1.6k minified without the demo styles! And as low as 323 bytes if you don't need breakpoints!**
3+
**mini Mighty Grid is 3 grids in one. And all at an overhead of only 1.6k minified without the demo styles! And as low as 323 bytes if you don't need breakpoints and compile your own css!**
44

5-
- Responsive, 12 column grid
6-
- Responsive, percentage grid based on known percentages
7-
- Responsive, floating point grid with any combination of fractions that total 100%
5+
- Responsive, standard, 12 column grid
6+
- Responsive, percentage grid based that you can use any combination of percentages that equall 100%
7+
- Responsive, floating point grid that you set whatever number you choose as 100% and with any combination of column widths that total that 100%
88

99
###Requires###
1010
[Sass](http://sass-lang.com/), CSS extension language.
1111

12-
Note: if you just want the grid with the default breakpoints (480, 768, 960, 1200) and don't want to compile sass, you can grab the mini-mighty-grid.min.css from the css folder and be on your way.
12+
Note: if you just want the grid with the default breakpoints (0, 480, 768, 960, 1200) and don't want to compile sass, you can download the default branch of this repo, grab the "mini-mighty-grid.min.css" and be on your way.
1313

1414
####SASS Usage####
1515
1. Use SASS to compile `/scss/layout.scss` and export to the css directory. Compiling layout.scss will compile all the mixins and settings into a single css file. You can use whatever method is comfortable for you. The command line might look like `scss --watch layout.scss:../css/layout.css --style compressed`
@@ -88,7 +88,7 @@ The sass/css
8888

8989
The floating point grid works almost exactly like the percentage grid with two exceptions. The widths are expressed in floating point numbers that equal 100% of the total units given and the sass function receives 2 variables. The floating point number and total units.
9090

91-
This example would render a row with the first column 2.4 units out of 7 width and the second column 4.6 units out of 7 width (2.4 + 4.6 = 7 or 100%). You can use any set of units you like as long as the end result is 100% of the 2nd variable.
91+
This example would render a row with the first column 2.4 units out of 7 units wide and the second column 4.6 units out of 7 units wide (2.4 + 4.6 = 7 or 100%). You can use any set of units you like as long as the end result is 100% of the 2nd variable.
9292

9393
Note the name of the sass function is colu().
9494

@@ -117,11 +117,11 @@ The sass/css
117117
```
118118

119119
###100% width layouts###
120-
For 100% width layouts simply use the `.container-fullwidth` class instead of `.container`. This works for all grids.
120+
For 100% width layouts simply use the `.fullwidth-container` class instead of `.container`. This works for all grids.
121121

122122
Example:
123123
```
124-
<div class="container-fullwidth">
124+
<div class="fullwidth-container">
125125
<div class="row">
126126
<div class="col-sm-12 col-md-6">
127127
...content here...
@@ -132,4 +132,4 @@ Example:
132132
</div>
133133
</div>
134134
```
135-
Special thanks to [Francisco](https://github.com/dospuntocero) for the percentage and floating point grids and for making the whole thing 1.6k instead of 2.8!
135+
Special thanks to [Francisco](https://github.com/dospuntocero) for the percentage and floating point grids and for making the whole thing 1.6k instead of 2.8!

css/layout.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/layout.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mini-mighty-grid.min.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

index.html

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,9 @@
77
</head>
88
<body>
99

10-
<div class="container">
11-
<div class="row">
12-
<h3>Fixed width, percentage grid, with known column width percentages. </h3>
13-
<div class="blue-colp-fixed">
14-
<p>This column is 25% Blue</p>
15-
</div>
16-
<div class="red-colp-fixed">
17-
<p>This column is 75% Red</p>
18-
</div>
19-
</div>
20-
</div>
21-
22-
<br>
23-
24-
<div class="container">
25-
<div class="row">
26-
<h3>Fixed width, floating point grid, with any combination of column widths that total 100%. </h3>
27-
<div class="blue-colu-fixed">
28-
<p>This column is 2.4 of 7 Blue</p>
29-
</div>
30-
<div class="red-colu-fixed">
31-
<p>This column is 4.6 of 7 Red</p>
32-
</div>
33-
</div>
34-
</div>
35-
36-
<br>
37-
38-
<div class="container">
39-
<div class="row">
40-
<h3>Fixed width, 12 column grid. </h3>
10+
<section class="container">
11+
<article class="row">
12+
<h3>Fixed width, 12 column grid divided into three 4-column sections. </h3>
4113
<div class="col-sm-12 col-md-4">
4214
<p>
4315
Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
@@ -53,42 +25,42 @@ <h3>Fixed width, 12 column grid. </h3>
5325
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
5426
</p>
5527
</div>
56-
</div>
57-
</div>
28+
</article>
29+
</section>
5830

5931
<br>
6032

61-
<div class="container-fullwidth">
62-
<div class="row">
63-
<h3>100% width, percentage grid, with known column width percentages. </h3>
33+
<section class="container">
34+
<article class="row">
35+
<h3>Fixed width, percentage grid, with column widths expressed in percentages. </h3>
6436
<div class="blue-colp-fixed">
6537
<p>This column is 25% Blue</p>
6638
</div>
6739
<div class="red-colp-fixed">
6840
<p>This column is 75% Red</p>
6941
</div>
70-
</div>
71-
</div>
42+
</article>
43+
</section>
7244

7345
<br>
7446

75-
<div class="container-fullwidth">
76-
<div class="row">
77-
<h3>100% width, floating point grid, with any combination of column widths that total 100%. </h3>
47+
<section class="container">
48+
<article class="row">
49+
<h3>Fixed width, floating point grid, with any combination of column widths that total 100%. </h3>
7850
<div class="blue-colu-fixed">
7951
<p>This column is 2.4 of 7 Blue</p>
8052
</div>
8153
<div class="red-colu-fixed">
8254
<p>This column is 4.6 of 7 Red</p>
8355
</div>
84-
</div>
85-
</div>
56+
</article>
57+
</section>
8658

8759
<br>
8860

89-
<div class="container-fullwidth">
61+
<section class="fullwidth-container">
9062
<div class="row">
91-
<h3>100% width, 12 column grid. </h3>
63+
<h3>100% width, 12 column grid divided into three 4-column sections. </h3>
9264
<div class="col-sm-4">
9365
<p>
9466
Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
@@ -105,7 +77,35 @@ <h3>100% width, 12 column grid. </h3>
10577
</p>
10678
</div>
10779
</div>
108-
</div>
80+
</section>
81+
82+
<br>
83+
84+
<section class="fullwidth-container">
85+
<article class="row">
86+
<h3>100% width, percentage grid, with column widths expressed in percentages. </h3>
87+
<div class="blue-colp-fixed">
88+
<p>This column is 25% Blue</p>
89+
</div>
90+
<div class="red-colp-fixed">
91+
<p>This column is 75% Red</p>
92+
</div>
93+
</article>
94+
</section>
95+
96+
<br>
97+
98+
<section class="fullwidth-container">
99+
<div class="row">
100+
<h3>100% width, floating point grid, with any combination of column widths that total 100%. </h3>
101+
<div class="blue-colu-fixed">
102+
<p>This column is 2.4 of 7 Blue</p>
103+
</div>
104+
<div class="red-colu-fixed">
105+
<p>This column is 4.6 of 7 Red</p>
106+
</div>
107+
</div>
108+
</section>
109109

110110

111111
</body>

scss/_site-settings.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ $gutter : 0; // Gutter width. Will be /2
1010
* base styles for mobile first.
1111
*/
1212
$breakpoint-map: (
13-
'sm' : ( min-width: 480px ), // Small up to medium.
14-
'md' : ( min-width: 768px ), // Medium up to large.
13+
'xs' : ( min-width: 0px ), // XSmall up to Small.
14+
'sm' : ( min-width: 480px ), // Small up to Medium.
15+
'md' : ( min-width: 768px ), // Medium up to Large.
1516
'lg' : ( min-width: 960px ), // Large up to X-Large.
1617
'xl' : ( min-width: $container ) // X-Large and above.
1718
);

0 commit comments

Comments
 (0)