├── GGS.css ├── GGS.html ├── GGS.js ├── GGS.less ├── GGS.scss ├── GGS.styl ├── goldengridsystem.com ├── assets │ ├── GGS.css │ ├── GGS.js │ ├── GGS.less │ ├── favicon.png │ ├── helpful-LESS-functions.less │ └── icon.png └── index.html ├── license.md └── readme.md /GGS.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | /* 9 | * 10 | * Margin, padding, and border resets 11 | * except for form elements 12 | * 13 | */ 14 | body, 15 | div, 16 | h1, 17 | h2, 18 | h3, 19 | h4, 20 | h5, 21 | h6, 22 | p, 23 | blockquote, 24 | pre, 25 | dl, 26 | dt, 27 | dd, 28 | ol, 29 | ul, 30 | li, 31 | fieldset, 32 | form, 33 | label, 34 | legend, 35 | th, 36 | td, 37 | article, 38 | aside, 39 | figure, 40 | footer, 41 | header, 42 | hgroup, 43 | menu, 44 | nav, 45 | section { 46 | margin: 0; 47 | padding: 0; 48 | border: 0; 49 | } 50 | /* 51 | * 52 | * Consistency fixes 53 | * adopted from http://necolas.github.com/normalize.css/ 54 | * 55 | */ 56 | html { 57 | height: 100%; 58 | -webkit-text-size-adjust: 100%; 59 | -ms-text-size-adjust: 100%; 60 | } 61 | body { 62 | min-height: 100%; 63 | font-size: 100%; 64 | } 65 | article, 66 | aside, 67 | details, 68 | figcaption, 69 | figure, 70 | footer, 71 | header, 72 | hgroup, 73 | nav, 74 | section, 75 | audio, 76 | canvas, 77 | video { 78 | display: block; 79 | } 80 | sub, sup { 81 | font-size: 75%; 82 | line-height: 0; 83 | position: relative; 84 | vertical-align: baseline; 85 | } 86 | sup { 87 | top: -0.5em; 88 | } 89 | sub { 90 | bottom: -0.25em; 91 | } 92 | pre { 93 | white-space: pre; 94 | white-space: pre-wrap; 95 | word-wrap: break-word; 96 | } 97 | b, strong { 98 | font-weight: bold; 99 | } 100 | abbr[title] { 101 | border-bottom: 1px dotted; 102 | } 103 | input, 104 | textarea, 105 | button, 106 | select { 107 | margin: 0; 108 | font-size: 100%; 109 | line-height: normal; 110 | vertical-align: baseline; 111 | } 112 | button, 113 | html input[type="button"], 114 | input[type="reset"], 115 | input[type="submit"] { 116 | cursor: pointer; 117 | -webkit-appearance: button; 118 | } 119 | input[type="checkbox"], input[type="radio"] { 120 | -webkit-box-sizing: border-box; 121 | -moz-box-sizing: border-box; 122 | -o-box-sizing: border-box; 123 | -ms-box-sizing: border-box; 124 | box-sizing: border-box; 125 | } 126 | textarea { 127 | overflow: auto; 128 | } 129 | table { 130 | border-collapse: collapse; 131 | border-spacing: 0; 132 | } 133 | /* 134 | * 135 | * Simple fluid media 136 | * 137 | */ 138 | figure { 139 | position: relative; 140 | } 141 | figure img, 142 | figure object, 143 | figure embed, 144 | figure video { 145 | max-width: 100%; 146 | display: block; 147 | } 148 | img { 149 | border: 0; 150 | -ms-interpolation-mode: bicubic; 151 | } 152 | /* 153 | * 154 | * Zoomable baseline grid 155 | * type size presets 156 | * 157 | */ 158 | body { 159 | /* 16px / 24px */ 160 | 161 | font-size: 1em; 162 | line-height: 1.5em; 163 | } 164 | .small { 165 | /* 13px / 18px */ 166 | 167 | font-size: 0.8125em; 168 | line-height: 1.3846153846153846em; 169 | } 170 | .normal, h3 { 171 | /* 16px / 24px */ 172 | 173 | font-size: 1em; 174 | line-height: 1.5em; 175 | /* 24 */ 176 | 177 | } 178 | .large, h2, h1 { 179 | /* 26 / 36px */ 180 | 181 | font-size: 1.625em; 182 | line-height: 1.3846153846153846em; 183 | } 184 | .huge { 185 | /* 42px / 48px */ 186 | 187 | font-size: 2.625em; 188 | line-height: 1.1428571428571428em; 189 | } 190 | .massive { 191 | /* 68px / 72px */ 192 | 193 | font-size: 4.25em; 194 | line-height: 1.0588235294117647em; 195 | } 196 | .gigantic { 197 | /* 110px / 120px */ 198 | 199 | font-size: 6.875em; 200 | line-height: 1.0909090909090908em; 201 | } 202 | /* 203 | * 204 | * Four-column grid active 205 | * ---------------------------------------- 206 | * Margin | # 1 2 3 4 | Margin 207 | * 5.55555% | % 25 50 75 100 | 5.55555% 208 | * 209 | */ 210 | header, #twoway { 211 | margin: 0 5.555555555555555%; 212 | } 213 | h1, h2 { 214 | margin: 0.9230769230769231em 0 1.3846153846153846em; 215 | } 216 | h2 { 217 | font-weight: normal; 218 | } 219 | h3 { 220 | margin: 1.5em 0 1.5em; 221 | } 222 | /* 223 | * Simple elastic gutters 224 | * Note: box-sizing will not work in IE6-7 225 | */ 226 | .wrapper { 227 | padding: 0 0.75em; 228 | -webkit-box-sizing: border-box; 229 | -moz-box-sizing: border-box; 230 | box-sizing: border-box; 231 | } 232 | /* 233 | * 234 | * Fixes for IE6-8 235 | * http://jonikorpi.com/leaving-old-IE-behind/ 236 | * 237 | */ 238 | .ie body { 239 | width: 40em; 240 | margin: 0 auto; 241 | font-size: 1.0625em; 242 | } 243 | .ie h1 { 244 | /* 42px / 48px */ 245 | 246 | font-size: 2.625em; 247 | line-height: 1.1428571428571428em; 248 | margin: 1.1428571428571428em 0 0.5714285714285714em; 249 | } 250 | /* @media screen and (min-width: 640px) */ 251 | @media screen and (min-width: 40em) { 252 | body { 253 | /* Zoom baseline grid to 17/16 = 1.0625 */ 254 | 255 | font-size: 1.0625em; 256 | } 257 | h1 { 258 | /* 42px / 48px */ 259 | 260 | font-size: 2.625em; 261 | line-height: 1.1428571428571428em; 262 | margin: 1.1428571428571428em 0 0.5714285714285714em; 263 | } 264 | } 265 | /* 266 | * 267 | * Eight-column grid active 268 | * ---------------------------------------------------------------------- 269 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 270 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 271 | * 272 | * 273 | */ 274 | /* @media screen and (min-width: 720px) */ 275 | @media screen and (min-width: 45em) { 276 | body { 277 | /* Reset baseline grid to 16/16 = 1 */ 278 | 279 | font-size: 1em; 280 | } 281 | #twoway .wrapper { 282 | float: left; 283 | width: 50%; 284 | } 285 | } 286 | /* @media screen and (min-width: 888px) */ 287 | @media screen and (min-width: 55.5em) { 288 | body { 289 | /* Zoom baseline grid to 17/16 = 1.0625 */ 290 | 291 | font-size: 1.0625em; 292 | } 293 | } 294 | /* @media screen and (min-width: 984px) */ 295 | @media screen and (min-width: 61.5em) { 296 | body { 297 | /* Reset baseline grid to 16/16 = 1.0 */ 298 | 299 | font-size: 1em; 300 | } 301 | header, #twoway { 302 | margin: 0 16.666666666666664%; 303 | } 304 | } 305 | /* @media screen and (min-width: 1200px) */ 306 | @media screen and (min-width: 75em) { 307 | body { 308 | /* Zoom baseline grid to 17/16 = 1.0625 */ 309 | 310 | font-size: 1.0625em; 311 | } 312 | } 313 | /* @media screen and (min-width: 1392px) */ 314 | @media screen and (min-width: 87em) { 315 | body { 316 | /* Reset baseline grid to 16/16 = 1.0 */ 317 | 318 | font-size: 1em; 319 | } 320 | header, #twoway { 321 | margin: 0 27.77777777777778%; 322 | } 323 | } 324 | /* @media screen and (min-width: 1680px) */ 325 | @media screen and (min-width: 105em) { 326 | body { 327 | /* Zoom baseline grid to 17/16 = 1.0625 */ 328 | 329 | font-size: 1.0625em; 330 | } 331 | } 332 | /* 333 | * 334 | * Sixteen-column grid active 335 | * ---------------------------------------------------------------------------------------------------------------------- 336 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 337 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 338 | * 339 | * 340 | */ 341 | /* @media screen and (min-width: 1872px) */ 342 | @media screen and (min-width: 117em) { 343 | header, #twoway { 344 | margin: 0 5.555555555555555%; 345 | } 346 | header .wrapper { 347 | width: 37.5%; 348 | margin-left: 25%; 349 | } 350 | #twoway .wrapper { 351 | width: 25%; 352 | } 353 | #twoway .wrapper:first-child { 354 | margin-left: 25%; 355 | } 356 | } 357 | /* @media screen and (min-width: 2080px) */ 358 | @media screen and (min-width: 130em) { 359 | body { 360 | /* Zoom baseline grid to 18/16 = 1.125 */ 361 | 362 | font-size: 1.125em; 363 | max-width: 160em; 364 | } 365 | } 366 | -------------------------------------------------------------------------------- /GGS.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | Golden Grid System Demo 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |

A Golden Demonstration

40 |

41 | Try resizing your browser or viewing this page on different devices. Use the icon in the upper right corner to see an overlay of the grid. 42 |

43 |
44 |
45 | 46 |
47 |
48 |

A two-way split

49 |

50 | These two blocks of text will float side by side with some empty columns on the sides on large screens. On medium-sized screens the empty columns will disappear, and on small screens the blocks will be stacked vertically. 51 |

52 |
53 |
54 |

By the way

55 |

56 | If you're viewing this page on an iOS device, it might zoom in wonkily when you rotate your device. This is because of a Mobile Safari bug. 57 |

58 |
59 |
60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /GGS.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Gridlet (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | var guideColor = 'rgb(255,195,0)'; 10 | var guideInnerColor = 'rgba(255,255,255, 0.91)'; 11 | var guideOpacity = '0.618'; 12 | 13 | var switchColor = 'rgb(0,0,0)'; 14 | var switchOpacity = '0.618'; 15 | 16 | var baseFontSize = 16; 17 | var baselineGridHeight = (24 / baseFontSize)+'em'; 18 | 19 | var eightColBreakpoint = ((720-1) / baseFontSize)+'em'; 20 | var sixteenColBreakpoint = ((1872-1) / baseFontSize)+'em'; 21 | 22 | /* 23 | * Note that the script might not work as expected if 24 | * the element of your page has a set width and 25 | * position: relative;, because the guides are appended 26 | * inside , but positioned in relation to . 27 | * 28 | * Also note that the baseline grid doesn't really align 29 | * up anymore after zooming the baseline grid in or out, 30 | * because of rounding errors. 31 | */ 32 | 33 | 34 | /*! 35 | * Ender: open module JavaScript framework 36 | * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat) 37 | * https://ender.no.de 38 | * License MIT 39 | * Build: ender -b jeesh 40 | */ 41 | !function(a){function d(a,b){return c(a,b)}function c(a,e,f){d._select&&(typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window)?(f=d._select(a,e),f.selector=a):f=isFinite(a.length)?a:[a];return b(f,c)}function b(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}b(d,{_VERSION:"0.2.4",ender:function(a,e){b(e?c:d,a)},fn:a.$&&a.$.fn||{}}),b(c,{forEach:function(a,b,c){for(c=0,l=this.length;c]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():z(a)?[a.cloneNode(!0)]:[]},J.doc=function(){var a=d.scrollWidth,b=d.scrollHeight,c=this.viewport();return{width:Math.max(a,c.width),height:Math.max(b,c.height)}},J.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c=0;e=e-2)while(j=H[r[e+1]](j,c[f]))if(p=Q.apply(j,P(r[e])))break;p&&(d[g++]=c[f])}return d}function S(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(L.g("^="+c)||L.s("^="+c,new RegExp("^"+R(c))));case"$=":return b.match(L.g("$="+c)||L.s("$="+c,new RegExp(R(c)+"$")));case"*=":return b.match(L.g(c)||L.s(c,new RegExp(R(c))));case"~=":return b.match(L.g("~="+c)||L.s("~="+c,new RegExp("(?:^|\\s+)"+R(c)+"(?:\\s+|$)")));case"|=":return b.match(L.g("|="+c)||L.s("|="+c,new RegExp("^"+R(c)+"(-|$)")))}return 0}function R(a){return K.g(a)||K.s(a,a.replace(D,"\\$1"))}function Q(a,b,c,e,f,g,h){var j,k,l;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(j=c.match(u))&&j[1]!==this.id)return!1;if(c&&(q=c.match(v)))for(d=q.length;d--;){k=q[d].slice(1);if(!(J.g(k)||J.s(k,new RegExp("(^|\\s+)"+k+"(\\s+|$)"))).test(this.className))return!1}if(e&&!h){i=this.attributes;for(l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&(i[l].name||l)==f)return this}if(e&&!S(g,this.getAttribute(f)||"",h))return!1;return this}function P(a){return a.match(G)}function O(a){while(a=a.previousSibling)if(a.nodeType==1)break;return a}function N(a){k=[];for(d=0,o=a.length;d])\s*/g,C=/([\s\>\+\~])(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,D=/([.*+?\^=!:${}()|\[\]\/\\])/g,E=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,F=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,G=new RegExp(E.source+"("+F.source+")?"),H={" ":function(a){return a&&a!==A&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){if(!a)return!1;c=O(a),d=O(b);return c&&d&&c==d&&c}};I.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var J=new I,K=new I,L=new I,M=new I,Y="compareDocumentPosition"in A?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in A?function(a,c){c=c==b||c==window?A:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},Z=b.querySelector&&b.querySelectorAll?function(a,c){if(b.getElementsByClassName&&(h=a.match(x)))return N(c.getElementsByClassName(h[1]));return N(c.querySelectorAll(a))}:function(a,c){a=a.replace(B,"$1");var d=[],f,i=[],j;if(h=a.match(z)){s=c.getElementsByTagName(h[1]||"*"),k=J.g(h[2])||J.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(j=0,g=s.length,e=0;j]+)/.exec(b)[1],f=(c||a).createElement(d[e]||"div"),g=[];f.innerHTML=b;var h=f.childNodes;f=f.firstChild,g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f);return g}var b=qwery.noConflict(),c="table",d={thead:c,tbody:c,tfoot:c,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"};$._select=function(a,c){return/^\s* or ? */ 48 | if (ender('body').offset().height > ender('html').offset().height) { 49 | var largerHeight = ender('body').offset().height; 50 | } 51 | else { 52 | var largerHeight = ender('html').offset().height; 53 | } 54 | 55 | /* Give guides the new height */ 56 | ender('.ggs-guide').each(function() { 57 | ender(this).css('height', largerHeight); 58 | }); 59 | 60 | /* Calculate the amount of lines needed and append them */ 61 | var lines = Math.floor(largerHeight/24); 62 | ender('#ggs-baseline-container').empty(); 63 | for (i=0; i<=lines; i++) { 64 | ender('#ggs-baseline-container').append('
'); 65 | } 66 | 67 | /* Set the baseline container to the same height as the guides, so there's no overflow */ 68 | ender('#ggs-baseline-container').css('height', largerHeight); 69 | } 70 | } 71 | 72 | ender.domReady(function () { 73 | 74 | /* Add control classes and switch element */ 75 | ender('body').addClass('ggs-hidden ggs-animated').append('
'); 76 | 77 | /* Create CSS */ 78 | var styles = '\ 79 | html{height:100%;position:relative;}\ 80 | #ggs-switch{position:fixed;top:0;right:0;z-index:9500; cursor:pointer; width: 24px; margin: 18px 18px 14px; opacity:'+switchOpacity+'; -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -ms-transform: rotate(-90deg); transform: rotate(-90deg); -webkit-transition: all 0.145s ease-out; -moz-transition: all 0.145s ease-out; -ms-transition: all 0.145s ease-out; transition: all 0.145s ease-out;}\ 81 | .ggs-switchBar {background: '+switchColor+'; height: 4px; margin-bottom: 4px;}\ 82 | .ggs-animated #ggs-switch {-webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); transform: rotate(0deg);}\ 83 | .ggs-guide{position:absolute;top:0;z-index:9000;height:100%;margin-left:-0.75em;border:solid '+guideColor+';border-width:0 0.75em;background:'+guideColor+';opacity:'+guideOpacity+'; -webkit-transition: all 0.235s ease-out; -moz-transition: all 0.235s ease-out; -ms-transition: all 0.235s ease-out; transition: all 0.235s ease-out;}\ 84 | .ggs-animated .ggs-guide {-webkit-transform: scale(0, 1); -moz-transform: scale(0, 1); -ms-transform: scale(0, 1); transform: scale(0, 1); opacity: 0;}\ 85 | .ggs-animated #ggs-baseline-container {opacity: 0;}\ 86 | .ggs-hidden .ggs-guide, .ggs-hidden #ggs-baseline-container {display: none;}\ 87 | .ggs-0{left:0;}\ 88 | .ggs-1{left:11.11111111111111%;}\ 89 | .ggs-2{left:16.666666666666664%;}\ 90 | .ggs-3{left:22.22222222222222%;}\ 91 | .ggs-4{left:27.77777777777778%;}\ 92 | .ggs-5{left:33.33333333333333%;}\ 93 | .ggs-6{left:38.888888888888886%;}\ 94 | .ggs-7{left:44.44444444444444%;}\ 95 | .ggs-8{left:50%;}\ 96 | .ggs-9{left:55.55555555555556%;}\ 97 | .ggs-10{left:61.11111111111111%;}\ 98 | .ggs-11{left:66.66666666666666%;}\ 99 | .ggs-12{left:72.22222222222221%;}\ 100 | .ggs-13{left:77.77777777777777%;}\ 101 | .ggs-14{left:83.33333333333333%;}\ 102 | .ggs-15{left:88.88888888888889%;}\ 103 | .ggs-16{right:0;}\ 104 | .ggs-0,.ggs-16{width:5.555555555555555%;padding-right:0.75em;border:0;margin:0;-moz-box-size:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}\ 105 | .ggs-guide div{background:'+guideInnerColor+';width:2px;height:100%;position:absolute;left:-1px;top:0;}\ 106 | .ggs-0 div{left:auto;right:0.75em;}\ 107 | .ggs-16 div{left:0.75em;}\ 108 | #ggs-baseline-container {opacity: '+guideOpacity+'; position: absolute; left:0; top:0; z-index: 8000; width: 100%; height: 100%; -webkit-transition: opacity 0.235s ease-out; -moz-transition: opacity 0.235s ease-out; -ms-transition: opacity 0.235s ease-out; transition: opacity 0.235s ease-out; overflow-y: hidden;}\ 109 | .ggs-line {border-top: 1px dotted '+guideColor+'; height: '+baselineGridHeight+'; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box;}\ 110 | @media screen and (max-width: '+(eightColBreakpoint)+'){.ggs-2,.ggs-6,.ggs-10,.ggs-14{display:none;}}\ 111 | @media screen and (max-width: '+(sixteenColBreakpoint)+'){.ggs-1,.ggs-3,.ggs-5,.ggs-7,.ggs-9,.ggs-11,.ggs-13,.ggs-15{display:none;}}\ 112 | '; 113 | 114 | /* Create guides */ 115 | for (i=0; i<=16; i++) { 116 | ender('body').append(ender('
')); 117 | }; 118 | ender('body').append(ender('
')); 119 | 120 | /* Append CSS */ 121 | (function(d,u) { 122 | if(d.createStyleSheet) { 123 | d.createStyleSheet( u ); 124 | } 125 | else { 126 | var css=d.createElement('style'); 127 | css.setAttribute("type","text/css"); 128 | css.appendChild(document.createTextNode(u)); 129 | d.getElementsByTagName("head")[0].appendChild(css); 130 | } 131 | }(document, styles)) 132 | 133 | /* Resize guides when window size changes */ 134 | ender(window).on('resize', setHeights); 135 | 136 | /* Add listeners for switch element */ 137 | ender('#ggs-switch').click(function(){ 138 | if (ender('body').hasClass('ggs-hidden')) { 139 | ender('body').removeClass('ggs-hidden'); 140 | setHeights(); 141 | setTimeout( 142 | function () { 143 | ender('body').removeClass('ggs-animated'); 144 | }, 145 | 20 146 | ); 147 | } 148 | else { 149 | ender('body').addClass('ggs-animated'); 150 | setTimeout( 151 | function () { 152 | ender('body').addClass('ggs-hidden'); 153 | }, 154 | 300 155 | ); 156 | } 157 | }); 158 | 159 | }); 160 | -------------------------------------------------------------------------------- /GGS.less: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | 10 | // 11 | // Important numbers 12 | // 13 | 14 | @line: 24; 15 | @column: 100% / 18; 16 | @font-size: 16; 17 | @em:@font-size*1em; 18 | 19 | 20 | /* 21 | * 22 | * Margin, padding, and border resets 23 | * except for form elements 24 | * 25 | */ 26 | 27 | body, 28 | div, 29 | h1, 30 | h2, 31 | h3, 32 | h4, 33 | h5, 34 | h6, 35 | p, 36 | blockquote, 37 | pre, 38 | dl, 39 | dt, 40 | dd, 41 | ol, 42 | ul, 43 | li, 44 | fieldset, 45 | form, 46 | label, 47 | legend, 48 | th, 49 | td, 50 | article, 51 | aside, 52 | figure, 53 | footer, 54 | header, 55 | hgroup, 56 | menu, 57 | nav, 58 | section { 59 | margin: 0; 60 | padding: 0; 61 | border: 0; 62 | } 63 | 64 | 65 | /* 66 | * 67 | * Consistency fixes 68 | * adopted from http://necolas.github.com/normalize.css/ 69 | * 70 | */ 71 | 72 | html { 73 | height: 100%; 74 | -webkit-text-size-adjust: 100%; 75 | -ms-text-size-adjust: 100%; 76 | } 77 | body { 78 | min-height: 100%; 79 | font-size: 100%; 80 | } 81 | article, aside, details, figcaption, figure, 82 | footer, header, hgroup, nav, section, audio, canvas, video { 83 | display: block; 84 | } 85 | sub, sup { 86 | font-size: 75%; 87 | line-height: 0; 88 | position: relative; 89 | vertical-align: baseline; 90 | } 91 | sup { 92 | top: -0.5em; 93 | } 94 | sub { 95 | bottom: -0.25em; 96 | } 97 | pre { 98 | white-space: pre; 99 | white-space: pre-wrap; 100 | word-wrap: break-word; 101 | } 102 | b, strong { 103 | font-weight: bold; 104 | } 105 | abbr[title] { 106 | border-bottom: 1px dotted; 107 | } 108 | input, textarea, button, select { 109 | margin: 0; 110 | font-size: 100%; 111 | line-height: normal; 112 | vertical-align: baseline; 113 | } 114 | button, 115 | html input[type="button"], 116 | input[type="reset"], 117 | input[type="submit"] { 118 | cursor: pointer; 119 | -webkit-appearance: button; 120 | } 121 | input[type="checkbox"], 122 | input[type="radio"] { 123 | -webkit-box-sizing: border-box; 124 | -moz-box-sizing: border-box; 125 | -o-box-sizing: border-box; 126 | -ms-box-sizing: border-box; 127 | box-sizing: border-box; 128 | } 129 | textarea { 130 | overflow: auto; 131 | } 132 | table { 133 | border-collapse: collapse; 134 | border-spacing: 0; 135 | } 136 | 137 | 138 | /* 139 | * 140 | * Simple fluid media 141 | * 142 | */ 143 | 144 | figure { 145 | position: relative; 146 | } 147 | figure img, figure object, figure embed, figure video { 148 | max-width: 100%; 149 | display: block; 150 | } 151 | img { 152 | border: 0; 153 | -ms-interpolation-mode: bicubic; 154 | } 155 | 156 | 157 | /* 158 | * 159 | * Zoomable baseline grid 160 | * type size presets 161 | * 162 | */ 163 | 164 | body { 165 | /* 16px / 24px */ 166 | font-size: @font-size / 16 * 1em; 167 | line-height: @line / @em; 168 | } 169 | 170 | .small { 171 | /* 13px / 18px */ 172 | font-size: (@font-size*0.8125) / @em; 173 | line-height: (@line*0.75) / (@font-size*0.8125) * 1em; 174 | } 175 | 176 | .normal, h3 { 177 | /* 16px / 24px */ 178 | font-size: @font-size / @em; 179 | line-height: @line / @em; /* 24 */ 180 | } 181 | 182 | .large, h2, h1 { 183 | /* 26 / 36px */ 184 | font-size: 26 / @em; 185 | line-height: (@line*1.5) / 26 * 1em; 186 | } 187 | 188 | .huge { 189 | /* 42px / 48px */ 190 | font-size: 42 / @em; 191 | line-height: (@line*2) / 42 * 1em; 192 | } 193 | 194 | .massive { 195 | /* 68px / 72px */ 196 | font-size: 68 / @em; 197 | line-height: (@line*3) / 68 * 1em; 198 | } 199 | 200 | .gigantic { 201 | /* 110px / 120px */ 202 | font-size: 110 / @em; 203 | line-height: (@line*5) / 110 * 1em; 204 | } 205 | 206 | 207 | /* 208 | * 209 | * Four-column grid active 210 | * ---------------------------------------- 211 | * Margin | # 1 2 3 4 | Margin 212 | * 5.55555% | % 25 50 75 100 | 5.55555% 213 | * 214 | */ 215 | 216 | header, #twoway { 217 | margin: 0 @column; 218 | } 219 | 220 | h1, h2 { 221 | margin: (24/26*1em) 0 (36/26*1em); 222 | } 223 | 224 | h2 { 225 | font-weight: normal; 226 | } 227 | 228 | h3 { 229 | margin: (24/@em) 0 (24/@em); 230 | } 231 | 232 | /* 233 | * Simple elastic gutters 234 | * Note: box-sizing will not work in IE6-7 235 | */ 236 | 237 | .wrapper { 238 | padding: 0 (@line/2)/@em; 239 | -webkit-box-sizing: border-box; 240 | -moz-box-sizing: border-box; 241 | box-sizing: border-box; 242 | } 243 | 244 | 245 | /* 246 | * 247 | * Fixes for IE6-8 248 | * http://jonikorpi.com/leaving-old-IE-behind/ 249 | * 250 | */ 251 | 252 | .ie body { 253 | width: 640/@em; 254 | margin: 0 auto; 255 | font-size: (@font-size + 1) / @em; 256 | } 257 | 258 | .ie h1 { 259 | .huge(); 260 | margin: (48/42*1em) 0 (24/42*1em); 261 | } 262 | 263 | /* @media screen and (min-width: 640px) */ 264 | @media screen and (min-width: 40em) { 265 | 266 | body { 267 | /* Zoom baseline grid to 17/16 = 1.0625 */ 268 | font-size: (@font-size + 1) / @em; 269 | } 270 | 271 | h1 { 272 | .huge(); 273 | margin: (48/42*1em) 0 (24/42*1em); 274 | } 275 | 276 | } 277 | 278 | 279 | /* 280 | * 281 | * Eight-column grid active 282 | * ---------------------------------------------------------------------- 283 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 284 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 285 | * 286 | * 287 | */ 288 | 289 | /* @media screen and (min-width: 720px) */ 290 | @media screen and (min-width: 45em) { 291 | 292 | body { 293 | /* Reset baseline grid to 16/16 = 1 */ 294 | font-size: (@font-size) / @em; 295 | } 296 | 297 | #twoway .wrapper { 298 | float: left; 299 | width: 50%; 300 | } 301 | 302 | } 303 | 304 | 305 | /* @media screen and (min-width: 888px) */ 306 | @media screen and (min-width: 55.5em) { 307 | 308 | body { 309 | /* Zoom baseline grid to 17/16 = 1.0625 */ 310 | font-size: (@font-size + 1) / @em; 311 | } 312 | } 313 | 314 | 315 | /* @media screen and (min-width: 984px) */ 316 | @media screen and (min-width: 61.5em) { 317 | 318 | body { 319 | /* Reset baseline grid to 16/16 = 1.0 */ 320 | font-size: (@font-size) / @em; 321 | } 322 | 323 | header, #twoway { 324 | margin: 0 @column*3; 325 | } 326 | 327 | } 328 | 329 | 330 | /* @media screen and (min-width: 1200px) */ 331 | @media screen and (min-width: 75em) { 332 | 333 | body { 334 | /* Zoom baseline grid to 17/16 = 1.0625 */ 335 | font-size: (@font-size + 1) / @em; 336 | } 337 | 338 | } 339 | 340 | 341 | /* @media screen and (min-width: 1392px) */ 342 | @media screen and (min-width: 87em) { 343 | 344 | body { 345 | /* Reset baseline grid to 16/16 = 1.0 */ 346 | font-size: (@font-size) / @em; 347 | } 348 | 349 | header, #twoway { 350 | margin: 0 @column*5; 351 | } 352 | 353 | } 354 | 355 | 356 | /* @media screen and (min-width: 1680px) */ 357 | @media screen and (min-width: 105em) { 358 | 359 | body { 360 | /* Zoom baseline grid to 17/16 = 1.0625 */ 361 | font-size: (@font-size + 1) / @em; 362 | } 363 | 364 | } 365 | 366 | 367 | /* 368 | * 369 | * Sixteen-column grid active 370 | * ---------------------------------------------------------------------------------------------------------------------- 371 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 372 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 373 | * 374 | * 375 | */ 376 | 377 | /* @media screen and (min-width: 1872px) */ 378 | @media screen and (min-width: 117em) { 379 | 380 | header, #twoway { 381 | margin: 0 @column*1; 382 | } 383 | 384 | header .wrapper { 385 | width: 37.5%; 386 | margin-left: 25%; 387 | } 388 | 389 | #twoway .wrapper { 390 | width: 25%; 391 | } 392 | 393 | #twoway .wrapper:first-child { 394 | margin-left: 25%; 395 | } 396 | 397 | } 398 | 399 | 400 | /* @media screen and (min-width: 2080px) */ 401 | @media screen and (min-width: 130em) { 402 | 403 | body { 404 | /* Zoom baseline grid to 18/16 = 1.125 */ 405 | font-size: (@font-size + 2) / @em; 406 | max-width: 2560/@em; 407 | } 408 | 409 | } -------------------------------------------------------------------------------- /GGS.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.0) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | 10 | // 11 | // Important numbers 12 | // 13 | 14 | $line: 24; 15 | $column: 100% / 18; 16 | $font-size: 16; 17 | $em: $font-size * 1; 18 | 19 | 20 | /* 21 | * 22 | * Margin, padding, and border resets 23 | * except for form elements 24 | * 25 | */ 26 | 27 | html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, nav, section, menu, time, mark, audio, video, canvas { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | } 32 | 33 | 34 | /* 35 | * 36 | * Consistency fixes 37 | * adopted from http://necolas.github.com/normalize.css/ 38 | * 39 | */ 40 | 41 | html { 42 | height: 100%; 43 | -webkit-text-size-adjust: 100%; 44 | -ms-text-size-adjust: 100%; 45 | } 46 | body { 47 | min-height: 100%; 48 | font-size: 100%; 49 | } 50 | article, aside, details, figcaption, figure, 51 | footer, header, hgroup, nav, section, audio, canvas, video { 52 | display: block; 53 | } 54 | sub, sup { 55 | font-size: 75%; 56 | line-height: 0; 57 | position: relative; 58 | vertical-align: baseline; 59 | } 60 | sup { 61 | top: -0.5em; 62 | } 63 | sub { 64 | bottom: -0.25em; 65 | } 66 | pre { 67 | white-space: pre; 68 | white-space: pre-wrap; 69 | word-wrap: break-word; 70 | } 71 | b, strong { 72 | font-weight: bold; 73 | } 74 | abbr[title] { 75 | border-bottom: 1px dotted; 76 | } 77 | input, textarea, button, select { 78 | margin: 0; 79 | font-size: 100%; 80 | line-height: normal; 81 | vertical-align: baseline; 82 | } 83 | button, 84 | html input[type="button"], 85 | input[type="reset"], 86 | input[type="submit"] { 87 | cursor: pointer; 88 | -webkit-appearance: button; 89 | } 90 | input[type="checkbox"], 91 | input[type="radio"] { 92 | -webkit-box-sizing: border-box; 93 | -moz-box-sizing: border-box; 94 | -ms-box-sizing: border-box; 95 | -o-box-sizing: border-box; 96 | box-sizing: border-box; 97 | } 98 | textarea { 99 | overflow: auto; 100 | } 101 | table { 102 | border-collapse: collapse; 103 | border-spacing: 0; 104 | } 105 | 106 | 107 | /* 108 | * 109 | * Simple fluid media 110 | * 111 | */ 112 | 113 | figure { 114 | position: relative; 115 | } 116 | figure img, figure object, figure embed, figure video { 117 | max-width: 100%; 118 | display: block; 119 | } 120 | img { 121 | border: 0; 122 | -ms-interpolation-mode: bicubic; 123 | } 124 | 125 | 126 | /* 127 | * 128 | * Zoomable baseline grid 129 | * type size presets 130 | * 131 | */ 132 | 133 | body { 134 | /* 16px / 24px */ 135 | font-size: $font-size / 16 * 1em; 136 | line-height: #{$line / $em}em; 137 | } 138 | 139 | @mixin small { 140 | /* 13px / 18px */ 141 | font-size: #{($font-size*0.8125) / $em}em; 142 | line-height: ($line*0.75) / ($font-size*0.8125) * 1em; 143 | } 144 | @mixin normal { 145 | /* 16px / 24px */ 146 | font-size: #{$font-size / $em}em; 147 | line-height: #{$line / $em}em; /* 24 */ 148 | } 149 | 150 | h3 { 151 | @include normal; 152 | } 153 | 154 | @mixin large { 155 | /* 26 / 36px */ 156 | font-size: #{26 / $em}em; 157 | line-height: ($line*1.5) / 26 * 1em; 158 | } 159 | 160 | h2, h1 { 161 | @include large; 162 | } 163 | 164 | @mixin huge { 165 | /* 42px / 48px */ 166 | font-size: #{42 / $em}em; 167 | line-height: ($line*2) / 42 * 1em; 168 | } 169 | 170 | @mixin massive { 171 | /* 68px / 72px */ 172 | font-size: #{68 / $em}em; 173 | line-height: ($line*3) / 68 * 1em; 174 | } 175 | 176 | @mixin gigantic { 177 | /* 110px / 120px */ 178 | font-size: #{110 / $em}em; 179 | line-height: ($line*5) / 110 * 1em; 180 | } 181 | 182 | 183 | /* 184 | * 185 | * Four-column grid active 186 | * ---------------------------------------- 187 | * Margin | # 1 2 3 4 | Margin 188 | * 5.55555% | % 25 50 75 100 | 5.55555% 189 | * 190 | */ 191 | 192 | header, #twoway { 193 | margin: 0 $column; 194 | } 195 | 196 | h1, h2 { 197 | margin: (24/26*1em) 0 (36/26*1em); 198 | } 199 | 200 | h2 { 201 | font-weight: normal; 202 | } 203 | 204 | h3 { 205 | margin: #{24/$em}em 0 #{24/$em}em; 206 | } 207 | 208 | /* 209 | * Simple elastic gutters 210 | * Note: box-sizing will not work in IE6-7 211 | */ 212 | 213 | .wrapper { 214 | padding: 0 #{($line/2)/$em}em; 215 | -webkit-box-sizing: border-box; 216 | -moz-box-sizing: border-box; 217 | -ms-box-sizing: border-box; 218 | box-sizing: border-box; 219 | } 220 | 221 | 222 | /* 223 | * 224 | * Fixes for IE6-8 225 | * http://jonikorpi.com/leaving-old-IE-behind/ 226 | * 227 | */ 228 | 229 | .ie body { 230 | width: #{640/$em}em; 231 | margin: 0 auto; 232 | font-size: #{($font-size + 1) / $em}em; 233 | } 234 | 235 | .ie h1 { 236 | @include huge; 237 | margin: (48/42*1em) 0 (24/42*1em); 238 | } 239 | 240 | /* @media screen and (min-width: 640px) */ 241 | @media screen and (min-width: 40em) { 242 | 243 | body { 244 | /* Zoom baseline grid to 17/16 = 1.0625 */ 245 | font-size: #{($font-size + 1) / $em}em; 246 | } 247 | 248 | h1 { 249 | @include huge; 250 | margin: (48/42*1em) 0 (24/42*1em); 251 | } 252 | 253 | } 254 | 255 | 256 | /* 257 | * 258 | * Eight-column grid active 259 | * ---------------------------------------------------------------------- 260 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 261 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 262 | * 263 | * 264 | */ 265 | 266 | /* @media screen and (min-width: 720px) */ 267 | @media screen and (min-width: 45em) { 268 | 269 | body { 270 | /* Reset baseline grid to 16/16 = 1 */ 271 | font-size: #{($font-size) / $em}em; 272 | } 273 | 274 | #twoway .wrapper { 275 | float: left; 276 | width: 50%; 277 | } 278 | 279 | } 280 | 281 | 282 | /* @media screen and (min-width: 888px) */ 283 | @media screen and (min-width: 55.5em) { 284 | 285 | body { 286 | /* Zoom baseline grid to 17/16 = 1.0625 */ 287 | font-size: #{($font-size + 1) / $em}em; 288 | } 289 | } 290 | 291 | 292 | /* @media screen and (min-width: 984px) */ 293 | @media screen and (min-width: 61.5em) { 294 | 295 | body { 296 | /* Reset baseline grid to 16/16 = 1.0 */ 297 | font-size: #{($font-size) / $em}em; 298 | } 299 | 300 | header, #twoway { 301 | margin: 0 $column*3; 302 | } 303 | 304 | } 305 | 306 | 307 | /* @media screen and (min-width: 1200px) */ 308 | @media screen and (min-width: 75em) { 309 | 310 | body { 311 | /* Zoom baseline grid to 17/16 = 1.0625 */ 312 | font-size: #{($font-size + 1) / $em}em; 313 | } 314 | 315 | } 316 | 317 | 318 | /* @media screen and (min-width: 1392px) */ 319 | @media screen and (min-width: 87em) { 320 | 321 | body { 322 | /* Reset baseline grid to 16/16 = 1.0 */ 323 | font-size: #{($font-size) / $em}em; 324 | } 325 | 326 | header, #twoway { 327 | margin: 0 $column*5; 328 | } 329 | 330 | } 331 | 332 | 333 | /* @media screen and (min-width: 1680px) */ 334 | @media screen and (min-width: 105em) { 335 | 336 | body { 337 | /* Zoom baseline grid to 17/16 = 1.0625 */ 338 | font-size: #{($font-size + 1) / $em}em; 339 | } 340 | 341 | } 342 | 343 | 344 | /* 345 | * 346 | * Sixteen-column grid active 347 | * ---------------------------------------------------------------------------------------------------------------------- 348 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 349 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 350 | * 351 | * 352 | */ 353 | 354 | /* @media screen and (min-width: 1872px) */ 355 | @media screen and (min-width: 117em) { 356 | 357 | header, #twoway { 358 | margin: 0 $column*1; 359 | } 360 | 361 | header .wrapper { 362 | width: 37.5%; 363 | margin-left: 25%; 364 | } 365 | 366 | #twoway .wrapper { 367 | width: 25%; 368 | } 369 | 370 | #twoway .wrapper:first-child { 371 | margin-left: 25%; 372 | } 373 | 374 | } 375 | 376 | 377 | /* @media screen and (min-width: 2080px) */ 378 | @media screen and (min-width: 130em) { 379 | 380 | body { 381 | /* Zoom baseline grid to 18/16 = 1.125 */ 382 | font-size: #{($font-size + 2) / $em}em; 383 | max-width: (2560/$em)em; 384 | } 385 | 386 | } 387 | -------------------------------------------------------------------------------- /GGS.styl: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.0) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | 10 | // 11 | // Important numbers 12 | // 13 | 14 | line = 24 15 | column = 100% / 18 16 | font-size = 16 17 | em = font-size * 1 18 | 19 | 20 | /* 21 | * 22 | * Margin, padding, and border resets 23 | * except for form elements 24 | * 25 | */ 26 | 27 | html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, nav, section, menu, time, mark, audio, video, canvas 28 | margin 0 29 | padding 0 30 | border 0 31 | 32 | 33 | /* 34 | * 35 | * Consistency fixes 36 | * adopted from http//necolas.github.com/normalize.css/ 37 | * 38 | */ 39 | 40 | html 41 | height 100% 42 | -webkit-text-size-adjust 100% 43 | -ms-text-size-adjust 100% 44 | 45 | body 46 | min-height 100% 47 | font-size 100% 48 | 49 | article, aside, details, figcaption, figure, 50 | footer, header, hgroup, nav, section, audio, canvas, video 51 | display block 52 | 53 | sub, sup 54 | font-size 75% 55 | line-height 0 56 | position relative 57 | vertical-align baseline 58 | 59 | sup 60 | top -0.5em 61 | 62 | sub 63 | bottom -0.25em 64 | 65 | pre 66 | white-space pre 67 | white-space pre-wrap 68 | word-wrap break-word 69 | 70 | b, strong 71 | font-weight bold 72 | 73 | abbr[title] 74 | border-bottom 1px dotted 75 | 76 | input, textarea, button, select 77 | margin 0 78 | font-size 100% 79 | line-height normal 80 | vertical-align baseline 81 | 82 | button, 83 | html input[type="button"], 84 | input[type="reset"], 85 | input[type="submit"] 86 | cursor pointer 87 | -webkit-appearance button 88 | 89 | input[type="checkbox"], 90 | input[type="radio"] 91 | -webkit-box-sizing border-box 92 | -moz-box-sizing border-box 93 | -ms-box-sizing border-box 94 | -o-box-sizing border-box 95 | box-sizing border-box 96 | 97 | textarea 98 | overflow auto 99 | 100 | table 101 | border-collapse collapse 102 | border-spacing 0 103 | 104 | 105 | 106 | /* 107 | * 108 | * Simple fluid media 109 | * 110 | */ 111 | 112 | figure 113 | position relative 114 | 115 | figure img, figure object, figure embed, figure video 116 | max-width 100% 117 | display block 118 | 119 | img 120 | border 0 121 | -ms-interpolation-mode bicubic 122 | 123 | 124 | 125 | /* 126 | * 127 | * Zoomable baseline grid 128 | * type size presets 129 | * 130 | */ 131 | 132 | body 133 | /* 16px / 24px */ 134 | font-size (font-size / 16) * 1em 135 | line-height (line / em) * 1em 136 | 137 | .small 138 | /* 13px / 18px */ 139 | font-size ((font-size*0.8125) / em) * 1em 140 | line-height ((line*0.75) / (font-size*0.8125)) * 1em 141 | 142 | .normal, h3 143 | /* 16px / 24px */ 144 | font-size (font-size / em) * 1em 145 | line-height (line / em) * 1em /* 24 */ 146 | 147 | .large, h2, h1 148 | /* 26 / 36px */ 149 | font-size (26 / em) * 1em 150 | line-height ((line*1.5) / 26) * 1em 151 | 152 | hude(n=1) 153 | /* 42px / 48px */ 154 | font-size (42 / em) * 1em 155 | line-height ((line*2) / 42) * 1em 156 | 157 | .huge 158 | hude() 159 | 160 | .massive 161 | /* 68px / 72px */ 162 | font-size (68 / em) * 1em 163 | line-height ((line*3) / 68) * 1em 164 | 165 | .gigantic 166 | /* 110px / 120px */ 167 | font-size (110 / em) * 1em 168 | line-height ((line*5) / 110) * 1em 169 | 170 | 171 | /* 172 | * 173 | * Four-column grid active 174 | * ---------------------------------------- 175 | * Margin | # 1 2 3 4 | Margin 176 | * 5.55555% | % 25 50 75 100 | 5.55555% 177 | * 178 | */ 179 | 180 | header, #twoway 181 | margin 0 column 182 | 183 | h1, h2 184 | margin (24/26*1em) 0 (36/26*1em) 185 | 186 | h2 187 | font-weight normal 188 | 189 | h3 190 | margin (24/em)*1em 0 (24/em) * 1em 191 | 192 | /* 193 | * Simple elastic gutters 194 | * Note box-sizing will not work in IE6-7 195 | */ 196 | 197 | .wrapper 198 | padding 0 ((line/2)/em) * 1em 199 | -webkit-box-sizing border-box 200 | -moz-box-sizing border-box 201 | -ms-box-sizing border-box 202 | box-sizing border-box 203 | 204 | 205 | /* 206 | * 207 | * Fixes for IE6-8 208 | * http//jonikorpi.com/leaving-old-IE-behind/ 209 | * 210 | */ 211 | 212 | .ie body 213 | width (640/em) * 1em 214 | margin 0 auto 215 | font-size ((font-size + 1) / em) * 1em 216 | 217 | .ie h1 218 | hude() 219 | margin (48/42*1em) 0 (24/42*1em) 220 | 221 | /* @media screen and (min-width: 640px) */ 222 | @media screen and (min-width: 40em) 223 | 224 | body 225 | /* Zoom baseline grid to 17/16 = 1.0625 */ 226 | font-size ((font-size + 1) / em) * 1em 227 | 228 | h1 229 | hude() 230 | margin (48/42*1em) 0 (24/42*1em) 231 | 232 | 233 | 234 | /* 235 | * 236 | * Eight-column grid active 237 | * ---------------------------------------------------------------------- 238 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 239 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 240 | * 241 | * 242 | */ 243 | 244 | /* @media screen and (min-width: 720px) */ 245 | @media screen and (min-width: 45em) 246 | 247 | body 248 | /* Reset baseline grid to 16/16 = 1 */ 249 | font-size ((font-size) / em) * 1em 250 | 251 | #twoway .wrapper 252 | float left 253 | width 50% 254 | 255 | 256 | 257 | /* @media screen and (min-width: 888px) */ 258 | @media screen and (min-width: 55.5em) 259 | 260 | body 261 | /* Zoom baseline grid to 17/16 = 1.0625 */ 262 | font-size ((font-size + 1) / em) * 1em 263 | 264 | 265 | /* @media screen and (min-width: 984px) */ 266 | @media screen and (min-width: 61.5em) 267 | 268 | body 269 | /* Reset baseline grid to 16/16 = 1.0 */ 270 | font-size ((font-size) / em) * 1em 271 | 272 | header, #twoway 273 | margin 0 column*3 274 | 275 | 276 | 277 | /* @media screen and (min-width: 1200px) */ 278 | @media screen and (min-width: 75em) 279 | 280 | body 281 | /* Zoom baseline grid to 17/16 = 1.0625 */ 282 | font-size ((font-size + 1) / em) * 1em 283 | 284 | 285 | 286 | /* @media screen and (min-width: 1392px) */ 287 | @media screen and (min-width: 87em) 288 | 289 | body 290 | /* Reset baseline grid to 16/16 = 1.0 */ 291 | font-size ((font-size) / em) * 1em 292 | 293 | header, #twoway 294 | margin 0 column*5 295 | 296 | 297 | 298 | /* @media screen and (min-width: 1680px) */ 299 | @media screen and (min-width: 105em) 300 | 301 | body 302 | /* Zoom baseline grid to 17/16 = 1.0625 */ 303 | font-size ((font-size + 1) / em) * 1em 304 | 305 | 306 | 307 | /* 308 | * 309 | * Sixteen-column grid active 310 | * ---------------------------------------------------------------------------------------------------------------------- 311 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 312 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 313 | * 314 | * 315 | */ 316 | 317 | /* @media screen and (min-width: 1872px) */ 318 | @media screen and (min-width: 117em) 319 | 320 | header, #twoway 321 | margin 0 column*1 322 | 323 | header .wrapper 324 | width 37.5% 325 | margin-left 25% 326 | 327 | #twoway .wrapper 328 | width 25% 329 | 330 | #twoway .wrapperfirst-child 331 | margin-left 25% 332 | 333 | 334 | 335 | /* @media screen and (min-width: 2080px) */ 336 | @media screen and (min-width: 130em) 337 | 338 | body 339 | /* Zoom baseline grid to 18/16 = 1.125 */ 340 | font-size ((font-size + 2) / em) * 1em 341 | max-width (2560/em) * 1em 342 | 343 | -------------------------------------------------------------------------------- /goldengridsystem.com/assets/GGS.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | /**/ 9 | /* 10 | * 11 | * Margin, padding, and border resets 12 | * except for form elements 13 | * 14 | */ 15 | body, 16 | div, 17 | h1, 18 | h2, 19 | h3, 20 | h4, 21 | h5, 22 | h6, 23 | p, 24 | blockquote, 25 | pre, 26 | dl, 27 | dt, 28 | dd, 29 | ol, 30 | ul, 31 | li, 32 | fieldset, 33 | form, 34 | label, 35 | legend, 36 | th, 37 | td, 38 | article, 39 | aside, 40 | figure, 41 | footer, 42 | header, 43 | hgroup, 44 | menu, 45 | nav, 46 | section { 47 | margin: 0; 48 | padding: 0; 49 | border: 0; 50 | } 51 | /* 52 | * 53 | * Consistency fixes 54 | * adopted from http://necolas.github.com/normalize.css/ 55 | * 56 | */ 57 | html { 58 | height: 100%; 59 | -webkit-text-size-adjust: 100%; 60 | -ms-text-size-adjust: 100%; 61 | } 62 | body { 63 | min-height: 100%; 64 | font-size: 100%; 65 | } 66 | article, 67 | aside, 68 | details, 69 | figcaption, 70 | figure, 71 | footer, 72 | header, 73 | hgroup, 74 | nav, 75 | section, 76 | audio, 77 | canvas, 78 | video { 79 | display: block; 80 | } 81 | sub, sup { 82 | font-size: 75%; 83 | line-height: 0; 84 | position: relative; 85 | vertical-align: baseline; 86 | } 87 | sup { 88 | top: -0.5em; 89 | } 90 | sub { 91 | bottom: -0.25em; 92 | } 93 | pre { 94 | white-space: pre; 95 | white-space: pre-wrap; 96 | word-wrap: break-word; 97 | } 98 | b, strong { 99 | font-weight: bold; 100 | } 101 | abbr[title] { 102 | border-bottom: 1px dotted; 103 | } 104 | input, 105 | textarea, 106 | button, 107 | select { 108 | margin: 0; 109 | font-size: 100%; 110 | line-height: normal; 111 | vertical-align: baseline; 112 | } 113 | button, 114 | html input[type="button"], 115 | input[type="reset"], 116 | input[type="submit"] { 117 | cursor: pointer; 118 | -webkit-appearance: button; 119 | } 120 | input[type="checkbox"], input[type="radio"] { 121 | -webkit-box-sizing: border-box; 122 | -moz-box-sizing: border-box; 123 | -o-box-sizing: border-box; 124 | -ms-box-sizing: border-box; 125 | box-sizing: border-box; 126 | } 127 | textarea { 128 | overflow: auto; 129 | } 130 | table { 131 | border-collapse: collapse; 132 | border-spacing: 0; 133 | } 134 | /* 135 | * 136 | * Simple fluid media 137 | * 138 | */ 139 | figure { 140 | position: relative; 141 | } 142 | figure img, 143 | figure object, 144 | figure embed, 145 | figure video { 146 | max-width: 100%; 147 | display: block; 148 | } 149 | img { 150 | border: 0; 151 | -ms-interpolation-mode: bicubic; 152 | } 153 | /* 154 | * 155 | * Simple elastic gutters 156 | * Note: box-sizing will not work in IE6-8 157 | * 158 | */ 159 | .wrapper { 160 | padding: 0 0.75em; 161 | -webkit-box-sizing: border-box; 162 | -moz-box-sizing: border-box; 163 | -o-box-sizing: border-box; 164 | -ms-box-sizing: border-box; 165 | box-sizing: border-box; 166 | } 167 | /* 168 | * 169 | * Zoomable baseline grid 170 | * type size presets 171 | * 172 | */ 173 | body { 174 | font-size: 1em; 175 | line-height: 1.5em; 176 | } 177 | .small, 178 | small, 179 | code, 180 | #copyright p { 181 | font-size: 0.8125em; 182 | line-height: 1.3846153846153846em; 183 | } 184 | .normal, h4, h3 { 185 | font-size: 1em; 186 | line-height: 1.5em; 187 | } 188 | .large, h2, h1 { 189 | font-size: 1.625em; 190 | line-height: 1.3846153846153846em; 191 | } 192 | .huge { 193 | font-size: 2.625em; 194 | line-height: 1.1428571428571428em; 195 | } 196 | .massive { 197 | font-size: 4.25em; 198 | line-height: 1.0588235294117647em; 199 | } 200 | .gigantic { 201 | font-size: 6.875em; 202 | line-height: 1.0909090909090908em; 203 | } 204 | /* 205 | * 206 | * Typography 207 | * 208 | */ 209 | body, 210 | input, 211 | textarea, 212 | button, 213 | select { 214 | font-family: ff-dagny-web-pro, sans-serif; 215 | } 216 | pre, code { 217 | font-family: Menlo, Monaco, monospace; 218 | } 219 | article p, #content figure, #content header p { 220 | margin-bottom: 1.5em; 221 | -webkit-hyphens: auto; 222 | -moz-hyphens: auto; 223 | hyphens: auto; 224 | } 225 | article p:last-child { 226 | margin-bottom: 0; 227 | } 228 | #content header p { 229 | padding-bottom: 1.4375em; 230 | border-bottom: 0.0625em dotted #3d3c38; 231 | margin: 0; 232 | } 233 | h2 { 234 | margin-bottom: 0.46153846153846156em; 235 | } 236 | h3 { 237 | margin: 3em 0 1.5em; 238 | } 239 | #download h3, #guide h3 { 240 | margin: 1.5em 0 0; 241 | } 242 | #colophon h3 { 243 | border-bottom: 0.0625em dotted #9e9c95; 244 | margin: 0 0 0.6875em; 245 | } 246 | /* 247 | * 248 | * Colours 249 | * 250 | */ 251 | h1, 252 | h2, 253 | h3, 254 | strong, 255 | code { 256 | color: #171409; 257 | } 258 | #colophon { 259 | color: #9e9c95; 260 | } 261 | #follow p, #colophon h3 { 262 | color: #fffefa; 263 | } 264 | a { 265 | text-decoration: none; 266 | color: #171409; 267 | border-bottom: 0.125em solid #ffc300; 268 | } 269 | #colophon a { 270 | color: #ffc300; 271 | border-bottom-color: transparent; 272 | } 273 | a:hover { 274 | border-bottom-color: #171409; 275 | } 276 | #colophon a:hover { 277 | border-bottom-color: #ffc300; 278 | } 279 | a:active { 280 | border-bottom-color: #ffc300; 281 | color: #ffc300; 282 | } 283 | #colophon a:active { 284 | border-bottom-color: #fffefa; 285 | color: #fffefa; 286 | } 287 | ::selection { 288 | background: #ffc300; 289 | color: #171409; 290 | } 291 | ::-moz-selection { 292 | background: #ffc300; 293 | color: #171409; 294 | } 295 | img::selection { 296 | background: transparent; 297 | } 298 | img::-moz-selection { 299 | background: transparent; 300 | } 301 | body { 302 | -webkit-tap-highlight-color: #ffc300; 303 | } 304 | /* 305 | * 306 | * Four-column grid active 307 | * ---------------------------------------- 308 | * Margin | # 1 2 3 4 | Margin 309 | * 5.55555% | % 25 50 75 100 | 5.55555% 310 | * 311 | */ 312 | body { 313 | background: #fffefa; 314 | color: #3d3c38; 315 | } 316 | #masthead, #content, .inner { 317 | margin: 0 5.555555555555555%; 318 | } 319 | .wrapper { 320 | position: relative; 321 | } 322 | #masthead { 323 | clear: both; 324 | padding: 2.25em 0 1.5em; 325 | } 326 | #guides { 327 | height: 7.5em; 328 | position: relative; 329 | background: #171409; 330 | } 331 | .ggs-site-guide { 332 | height: 100%; 333 | position: absolute; 334 | top: 0; 335 | z-index: 9000; 336 | margin-left: -0.75em; 337 | border: solid #ffc300; 338 | background: #ffc300; 339 | border-width: 0 0.75em; 340 | -webkit-transition: all 0.618s ease-out; 341 | -moz-transition: all 0.618s ease-out; 342 | -ms-transition: all 0.618s ease-out; 343 | -o-transition: all 0.618s ease-out; 344 | transition: all 0.618s ease-out; 345 | } 346 | .ggs-site-guide div { 347 | background: #171409; 348 | width: 2px; 349 | height: 100%; 350 | position: absolute; 351 | left: -1px; 352 | top: 0; 353 | } 354 | .ggs-site-0 { 355 | left: 0; 356 | } 357 | .ggs-site-1 { 358 | left: 11.11111111111111%; 359 | } 360 | .ggs-site-2 { 361 | left: 16.666666666666664%; 362 | } 363 | .ggs-site-3 { 364 | left: 22.22222222222222%; 365 | } 366 | .ggs-site-4 { 367 | left: 27.77777777777778%; 368 | } 369 | .ggs-site-5 { 370 | left: 33.33333333333333%; 371 | } 372 | .ggs-site-6 { 373 | left: 38.888888888888886%; 374 | } 375 | .ggs-site-7 { 376 | left: 44.44444444444444%; 377 | } 378 | .ggs-site-8 { 379 | left: 50%; 380 | } 381 | .ggs-site-9 { 382 | left: 55.55555555555556%; 383 | } 384 | .ggs-site-10 { 385 | left: 61.11111111111111%; 386 | } 387 | .ggs-site-11 { 388 | left: 66.66666666666666%; 389 | } 390 | .ggs-site-12 { 391 | left: 72.22222222222221%; 392 | } 393 | .ggs-site-13 { 394 | left: 77.77777777777777%; 395 | } 396 | .ggs-site-14 { 397 | left: 83.33333333333333%; 398 | } 399 | .ggs-site-15 { 400 | left: 88.88888888888889%; 401 | } 402 | .ggs-site-16 { 403 | right: 0; 404 | } 405 | .ggs-site-0, .ggs-site-16 { 406 | width: 5.555555555555555%; 407 | padding-right: 0.75em; 408 | border: 0; 409 | margin: 0; 410 | } 411 | .ggs-site-0 div { 412 | left: auto; 413 | right: 0.75em; 414 | } 415 | .ggs-site-16 div { 416 | left: 0.75em; 417 | } 418 | @media screen and (max-width: 719px) { 419 | .ggs-site-2, 420 | .ggs-site-6, 421 | .ggs-site-10, 422 | .ggs-site-14 { 423 | -webkit-transform: scale(0, 1); 424 | -moz-transform: scale(0, 1); 425 | -ms-transform: scale(0, 1); 426 | -o-transform: scale(0, 1); 427 | transform: scale(0, 1); 428 | } 429 | } 430 | @media screen and (max-width: 1871px) { 431 | .ggs-site-1, 432 | .ggs-site-3, 433 | .ggs-site-5, 434 | .ggs-site-7, 435 | .ggs-site-9, 436 | .ggs-site-11, 437 | .ggs-site-13, 438 | .ggs-site-15 { 439 | -webkit-transform: scale(0, 1); 440 | -moz-transform: scale(0, 1); 441 | -ms-transform: scale(0, 1); 442 | -o-transform: scale(0, 1); 443 | transform: scale(0, 1); 444 | } 445 | } 446 | #content { 447 | margin-bottom: 3em; 448 | } 449 | #content header { 450 | padding-top: 3em; 451 | } 452 | #features figure { 453 | width: 100%; 454 | height: 12em; 455 | } 456 | .canvas { 457 | background: #171409; 458 | position: relative; 459 | height: 100%; 460 | overflow: hidden; 461 | } 462 | .gutter, .margin { 463 | height: 100%; 464 | width: 1.5em; 465 | background: #ffc300; 466 | position: absolute; 467 | left: 25%; 468 | top: 0; 469 | margin-left: -0.75em; 470 | } 471 | .gutter2 { 472 | left: 50%; 473 | } 474 | .gutter3 { 475 | left: 75%; 476 | } 477 | .gutter div { 478 | height: 100%; 479 | position: absolute; 480 | left: 50%; 481 | top: 0; 482 | margin-left: -0.0625em; 483 | width: 0.125em; 484 | background: #171409; 485 | } 486 | .margin { 487 | left: 0; 488 | margin: 0; 489 | width: 0.75em; 490 | } 491 | .right { 492 | left: auto; 493 | right: 0; 494 | } 495 | .line { 496 | height: 1.4375em; 497 | border-bottom: 0.0625em dotted #ffc300; 498 | } 499 | .text { 500 | position: absolute; 501 | left: 0.75em; 502 | top: 1.5em; 503 | color: #ffc300; 504 | white-space: pre; 505 | } 506 | .twoLines { 507 | font-size: 2.625em; 508 | line-height: 1.1428571428571428em; 509 | left: 0.2857142857142857em; 510 | top: 1.1428571428571428em; 511 | } 512 | .threeLines { 513 | font-size: 4.25em; 514 | line-height: 1.0588235294117647em; 515 | left: 0.17647058823529413em; 516 | top: 1.411764705882353em; 517 | } 518 | .fourLines { 519 | font-size: 6.875em; 520 | line-height: 1.0909090909090908em; 521 | left: 0.10909090909090909em; 522 | top: 1.5272727272727273em; 523 | } 524 | .fiveLines { 525 | font-size: 11.125em; 526 | line-height: 0.9438202247191011em; 527 | left: 0.06741573033707865em; 528 | top: 1.6179775280898876em; 529 | } 530 | .switch { 531 | position: absolute; 532 | right: 1.5em; 533 | top: 1.5em; 534 | width: 1.5em; 535 | } 536 | .switchBar { 537 | height: 0.25em; 538 | margin-bottom: 0.25em; 539 | background: #ffc300; 540 | } 541 | #folding .gutter1, #folding .gutter3 { 542 | background: none; 543 | border: dashed #ffc300; 544 | border-width: 0 0.0625em; 545 | width: 1.375em; 546 | } 547 | #gutters .canvas { 548 | background: #171409; 549 | } 550 | #gutters .gutter, #gutters .margin { 551 | background: #ffc300; 552 | } 553 | #baseline .canvas { 554 | background: #171409; 555 | } 556 | #guide { 557 | clear: both; 558 | } 559 | #colophon { 560 | clear: both; 561 | padding: 1.5em 0 0; 562 | background: #171409; 563 | } 564 | #follow { 565 | margin-bottom: 1.5em; 566 | } 567 | #promoGroup .wrapper { 568 | margin-bottom: 1.5em; 569 | } 570 | #promoGroup p { 571 | padding-left: 5.25em; 572 | } 573 | #colophon img { 574 | width: 4.5em; 575 | height: 4.5em; 576 | float: left; 577 | -webkit-border-radius: 0.1875em; 578 | -moz-border-radius: 0.1875em; 579 | border-radius: 0.1875em; 580 | overflow: hidden; 581 | } 582 | #copyright { 583 | padding-bottom: 2.25em; 584 | } 585 | /* 586 | * 587 | * Fixes for IE6-8 588 | * http://jonikorpi.com/leaving-old-IE-behind/ 589 | * 590 | */ 591 | .ie body { 592 | width: 640px; 593 | margin: 0 auto; 594 | border: solid #3d3c38; 595 | border-width: 0 0.0625em; 596 | font-size: 1.0625em; 597 | } 598 | /* 599 | * 600 | * Zoom baseline grid to 17/16 = 1.0625 601 | * 602 | */ 603 | @media screen and (min-width: 40em) { 604 | body { 605 | font-size: 1.0625em; 606 | } 607 | #guides { 608 | height: 12em; 609 | } 610 | #colophon:after { 611 | content: " "; 612 | display: block; 613 | height: 0; 614 | visibility: hidden; 615 | clear: both; 616 | } 617 | #promoGroup { 618 | -webkit-box-sizing: border-box; 619 | -moz-box-sizing: border-box; 620 | -o-box-sizing: border-box; 621 | -ms-box-sizing: border-box; 622 | box-sizing: border-box; 623 | } 624 | #promoGroup, #follow, #copyright { 625 | width: 50%; 626 | float: left; 627 | } 628 | #promoGroup { 629 | float: right; 630 | } 631 | #copyright p { 632 | font-size: 1em; 633 | line-height: 1.5em; 634 | } 635 | #promoGroup #promo, #copyright { 636 | margin-bottom: 3em; 637 | } 638 | } 639 | /* 640 | * 641 | * Eight-column grid active 642 | * ---------------------------------------------------------------------- 643 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 644 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 645 | * 646 | * 647 | */ 648 | @media screen and (min-width: 46.5em) { 649 | body { 650 | font-size: 1em; 651 | } 652 | #masthead .wrapper, #content .wrapper { 653 | margin: 0 12.5%; 654 | } 655 | #guides { 656 | height: 27em; 657 | } 658 | #masthead { 659 | padding: 3em 0 2.25em; 660 | } 661 | h1 { 662 | font-size: 2.625em; 663 | line-height: 1.1428571428571428em; 664 | } 665 | #masthead p, #follow p { 666 | font-size: 1.625em; 667 | line-height: 1.3846153846153846em; 668 | } 669 | #download h3 { 670 | float: left; 671 | margin: 0; 672 | clear: left; 673 | width: 5.25em; 674 | } 675 | #download div p { 676 | padding-left: 6em; 677 | margin-top: 1.5em; 678 | } 679 | } 680 | /* 681 | * 682 | * Zoom baseline grid to 17/16 = 1.0625 683 | * 684 | */ 685 | @media screen and (min-width: 55.5em) { 686 | body { 687 | font-size: 1.0625em; 688 | } 689 | } 690 | /* 691 | * 692 | * Reset baseline grid to 16/16 = 1.0 693 | * 694 | */ 695 | @media screen and (min-width: 61.5em) { 696 | body { 697 | font-size: 1em; 698 | } 699 | #masthead .wrapper, #content .wrapper { 700 | margin: 0; 701 | } 702 | #guides { 703 | height: 16.5em; 704 | } 705 | #content { 706 | float: left; 707 | margin-bottom: 4.5em; 708 | } 709 | #content header { 710 | padding-top: 4.5em; 711 | } 712 | h2 { 713 | font-size: 2.625em; 714 | line-height: 1.1428571428571428em; 715 | margin-bottom: 0.2857142857142857em; 716 | } 717 | #content header p { 718 | font-size: 1.625em; 719 | line-height: 1.3846153846153846em; 720 | padding-bottom: 0.8846153846153846em; 721 | border-bottom: 0.038461538461538464em dotted #3d3c38; 722 | } 723 | #features section.wrapper { 724 | width: 50%; 725 | } 726 | #features section.wrapper:nth-of-type(2n) { 727 | margin-left: 50%; 728 | } 729 | #features figure { 730 | width: 100%; 731 | height: 100%; 732 | position: absolute; 733 | top: 0; 734 | right: -100%; 735 | } 736 | #features section.wrapper:nth-of-type(2n) figure { 737 | right: auto; 738 | left: -100%; 739 | } 740 | .canvas { 741 | margin: 0 0.75em; 742 | } 743 | #download div.wrapper { 744 | float: left; 745 | width: 25%; 746 | } 747 | #download h3 { 748 | float: none; 749 | clear: none; 750 | width: auto; 751 | margin: 1.5em 0 1.5em; 752 | } 753 | #download div p { 754 | padding: 0; 755 | } 756 | #guide { 757 | float: left; 758 | } 759 | #guide div.wrapper { 760 | width: 50%; 761 | float: left; 762 | } 763 | } 764 | /* 765 | * 766 | * Zoom baseline grid to 17/16 = 1.0625 767 | * 768 | */ 769 | @media screen and (min-width: 75em) { 770 | body { 771 | font-size: 1.0625em; 772 | } 773 | } 774 | /* 775 | * 776 | * Reset baseline grid to 16/16 = 1.0 777 | * 778 | */ 779 | @media screen and (min-width: 87em) { 780 | body { 781 | font-size: 1em; 782 | } 783 | #masthead, #content, .inner { 784 | margin-left: 16.666666666666664%; 785 | margin-right: 16.666666666666664%; 786 | } 787 | #download div.wrapper { 788 | width: 16.6666667%; 789 | } 790 | #download div p { 791 | font-size: 0.8125em; 792 | line-height: 1.3846153846153846em; 793 | } 794 | } 795 | /* 796 | * 797 | * Zoom baseline grid to 17/16 = 1.0625 798 | * 799 | */ 800 | @media screen and (min-width: 105em) { 801 | body { 802 | font-size: 1.0625em; 803 | } 804 | } 805 | /* 806 | * 807 | * Sixteen-column grid active 808 | * ---------------------------------------------------------------------------------------------------------------------- 809 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 810 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 811 | * 812 | * 813 | */ 814 | @media screen and (min-width: 117em) { 815 | #masthead, #content, #colophon .inner { 816 | margin-left: 22.22222222222222%; 817 | margin-right: 22.22222222222222%; 818 | } 819 | #masthead { 820 | padding: 4.5em 0 3em; 821 | } 822 | h1 { 823 | font-size: 4.25em; 824 | line-height: 1.0588235294117647em; 825 | } 826 | #masthead p { 827 | font-size: 2.625em; 828 | line-height: 1.1428571428571428em; 829 | } 830 | #download div.wrapper { 831 | width: 20%; 832 | } 833 | #guides { 834 | height: 24em; 835 | } 836 | #features header { 837 | padding-top: 3em; 838 | } 839 | } 840 | @media screen and (min-width: 130em) { 841 | #masthead, #content, #colophon .inner { 842 | margin-left: 27.77777777777778%; 843 | margin-right: 27.77777777777778%; 844 | } 845 | #download div.wrapper { 846 | width: 25%; 847 | } 848 | #download div p { 849 | font-size: 1em; 850 | line-height: 1.5em; 851 | } 852 | } 853 | /* 854 | * 855 | * Zoom baseline grid to 18/16 = 1.125 856 | * 857 | */ 858 | @media screen and (min-width: 2496px) { 859 | body { 860 | font-size: 1.125em; 861 | } 862 | } 863 | @media screen and (min-width: 3216px) { 864 | #masthead, #content, #colophon .inner { 865 | margin-left: 33.33333333333333%; 866 | margin-right: 33.33333333333333%; 867 | } 868 | #download div.wrapper { 869 | width: 16.6666667%; 870 | } 871 | #download div p { 872 | font-size: 0.8125em; 873 | line-height: 1.3846153846153846em; 874 | } 875 | } 876 | /* 877 | * 878 | * Zoom baseline grid to 19/16 = 1.1875 879 | * 880 | */ 881 | @media screen and (min-width: 4104px) { 882 | body { 883 | font-size: 1.1875em; 884 | } 885 | } 886 | @media screen and (min-width: 4440px) { 887 | body { 888 | position: relative; 889 | max-width: 5120px; 890 | } 891 | #masthead, #content, #colophon .inner { 892 | margin-left: 38.888888888888886%; 893 | margin-right: 38.888888888888886%; 894 | } 895 | #download div.wrapper { 896 | width: 25%; 897 | } 898 | #download div p { 899 | font-size: 1em; 900 | line-height: 1.5em; 901 | } 902 | } 903 | -------------------------------------------------------------------------------- /goldengridsystem.com/assets/GGS.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Gridlet (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | var guideColor = 'rgb(255,195,0)'; 10 | var guideInnerColor = 'rgba(255,255,255, 0.91)'; 11 | var guideOpacity = '0.618'; 12 | 13 | var switchColor = 'rgb(255,195,0)'; 14 | var switchOpacity = '1'; 15 | 16 | var baseFontSize = 16; 17 | var baselineGridHeight = (24 / baseFontSize)+'em'; 18 | 19 | var eightColBreakpoint = ((720-1) / baseFontSize)+'em'; 20 | var sixteenColBreakpoint = ((1872-1) / baseFontSize)+'em'; 21 | 22 | /* 23 | * Note that the script might not work as expected if 24 | * the element of your page has a set width and 25 | * position: relative;, because the guides are appended 26 | * inside , but positioned in relation to . 27 | */ 28 | 29 | 30 | /*! 31 | * Ender: open module JavaScript framework 32 | * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat) 33 | * https://ender.no.de 34 | * License MIT 35 | * Build: ender -b jeesh 36 | */ 37 | !function(a){function d(a,b){return c(a,b)}function c(a,e,f){d._select&&(typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window)?(f=d._select(a,e),f.selector=a):f=isFinite(a.length)?a:[a];return b(f,c)}function b(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}b(d,{_VERSION:"0.2.4",ender:function(a,e){b(e?c:d,a)},fn:a.$&&a.$.fn||{}}),b(c,{forEach:function(a,b,c){for(c=0,l=this.length;c]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():z(a)?[a.cloneNode(!0)]:[]},J.doc=function(){var a=d.scrollWidth,b=d.scrollHeight,c=this.viewport();return{width:Math.max(a,c.width),height:Math.max(b,c.height)}},J.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c=0;e=e-2)while(j=H[r[e+1]](j,c[f]))if(p=Q.apply(j,P(r[e])))break;p&&(d[g++]=c[f])}return d}function S(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(L.g("^="+c)||L.s("^="+c,new RegExp("^"+R(c))));case"$=":return b.match(L.g("$="+c)||L.s("$="+c,new RegExp(R(c)+"$")));case"*=":return b.match(L.g(c)||L.s(c,new RegExp(R(c))));case"~=":return b.match(L.g("~="+c)||L.s("~="+c,new RegExp("(?:^|\\s+)"+R(c)+"(?:\\s+|$)")));case"|=":return b.match(L.g("|="+c)||L.s("|="+c,new RegExp("^"+R(c)+"(-|$)")))}return 0}function R(a){return K.g(a)||K.s(a,a.replace(D,"\\$1"))}function Q(a,b,c,e,f,g,h){var j,k,l;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(j=c.match(u))&&j[1]!==this.id)return!1;if(c&&(q=c.match(v)))for(d=q.length;d--;){k=q[d].slice(1);if(!(J.g(k)||J.s(k,new RegExp("(^|\\s+)"+k+"(\\s+|$)"))).test(this.className))return!1}if(e&&!h){i=this.attributes;for(l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&(i[l].name||l)==f)return this}if(e&&!S(g,this.getAttribute(f)||"",h))return!1;return this}function P(a){return a.match(G)}function O(a){while(a=a.previousSibling)if(a.nodeType==1)break;return a}function N(a){k=[];for(d=0,o=a.length;d])\s*/g,C=/([\s\>\+\~])(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,D=/([.*+?\^=!:${}()|\[\]\/\\])/g,E=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,F=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,G=new RegExp(E.source+"("+F.source+")?"),H={" ":function(a){return a&&a!==A&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){if(!a)return!1;c=O(a),d=O(b);return c&&d&&c==d&&c}};I.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var J=new I,K=new I,L=new I,M=new I,Y="compareDocumentPosition"in A?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in A?function(a,c){c=c==b||c==window?A:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},Z=b.querySelector&&b.querySelectorAll?function(a,c){if(b.getElementsByClassName&&(h=a.match(x)))return N(c.getElementsByClassName(h[1]));return N(c.querySelectorAll(a))}:function(a,c){a=a.replace(B,"$1");var d=[],f,i=[],j;if(h=a.match(z)){s=c.getElementsByTagName(h[1]||"*"),k=J.g(h[2])||J.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(j=0,g=s.length,e=0;j]+)/.exec(b)[1],f=(c||a).createElement(d[e]||"div"),g=[];f.innerHTML=b;var h=f.childNodes;f=f.firstChild,g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f);return g}var b=qwery.noConflict(),c="table",d={thead:c,tbody:c,tfoot:c,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"};$._select=function(a,c){return/^\s* or ? */ 44 | if (ender('body').offset().height > ender('html').offset().height) { 45 | var largerHeight = ender('body').offset().height; 46 | } 47 | else { 48 | var largerHeight = ender('html').offset().height; 49 | } 50 | 51 | /* Give guides the new height */ 52 | ender('.ggs-guide').each(function() { 53 | ender(this).css('height', largerHeight); 54 | }); 55 | 56 | /* Calculate the amount of lines needed and append them */ 57 | var lines = Math.floor(largerHeight/24); 58 | ender('#ggs-baseline-container').empty(); 59 | for (i=0; i<=lines; i++) { 60 | ender('#ggs-baseline-container').append('
'); 61 | } 62 | 63 | /* Set the baseline container to the same height as the guides, so there's no overflow */ 64 | ender('#ggs-baseline-container').css('height', largerHeight); 65 | } 66 | } 67 | 68 | ender.domReady(function () { 69 | 70 | /* Add control classes and switch element */ 71 | ender('body').addClass('ggs-hidden ggs-animated').append('
'); 72 | 73 | /* Create CSS */ 74 | var styles = '\ 75 | html{height:100%;position:relative;}\ 76 | #ggs-switch{position:fixed;top:0;right:0;z-index:9500; cursor:pointer; width: 24px; padding: 18px 18px 14px; opacity:'+switchOpacity+'; -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -ms-transform: rotate(-90deg); transform: rotate(-90deg); -webkit-transition: all 0.145s ease-out; -moz-transition: all 0.145s ease-out; -ms-transition: all 0.145s ease-out; transition: all 0.145s ease-out;}\ 77 | .ggs-switchBar {background: '+switchColor+'; height: 4px; margin-bottom: 4px;}\ 78 | .ggs-animated #ggs-switch {-webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); transform: rotate(0deg);}\ 79 | .ggs-guide{position:absolute;top:0;z-index:9000;height:100%;margin-left:-0.75em;border:solid '+guideColor+';border-width:0 0.75em;background:'+guideColor+';opacity:'+guideOpacity+'; -webkit-transition: all 0.235s ease-out; -moz-transition: all 0.235s ease-out; -ms-transition: all 0.235s ease-out; transition: all 0.235s ease-out;}\ 80 | .ggs-animated .ggs-guide {-webkit-transform: scale(0, 1); -moz-transform: scale(0, 1); -ms-transform: scale(0, 1); transform: scale(0, 1); opacity: 0;}\ 81 | .ggs-animated #ggs-baseline-container {opacity: 0;}\ 82 | .ggs-hidden .ggs-guide, .ggs-hidden #ggs-baseline-container {display: none;}\ 83 | .ggs-0{left:0;}\ 84 | .ggs-1{left:11.11111111111111%;}\ 85 | .ggs-2{left:16.666666666666664%;}\ 86 | .ggs-3{left:22.22222222222222%;}\ 87 | .ggs-4{left:27.77777777777778%;}\ 88 | .ggs-5{left:33.33333333333333%;}\ 89 | .ggs-6{left:38.888888888888886%;}\ 90 | .ggs-7{left:44.44444444444444%;}\ 91 | .ggs-8{left:50%;}\ 92 | .ggs-9{left:55.55555555555556%;}\ 93 | .ggs-10{left:61.11111111111111%;}\ 94 | .ggs-11{left:66.66666666666666%;}\ 95 | .ggs-12{left:72.22222222222221%;}\ 96 | .ggs-13{left:77.77777777777777%;}\ 97 | .ggs-14{left:83.33333333333333%;}\ 98 | .ggs-15{left:88.88888888888889%;}\ 99 | .ggs-16{right:0;}\ 100 | .ggs-0,.ggs-16{width:5.555555555555555%;padding-right:0.75em;border:0;margin:0;}\ 101 | .ggs-guide div{background:'+guideInnerColor+';width:2px;height:100%;position:absolute;left:-1px;top:0;}\ 102 | .ggs-0 div{left:auto;right:0.75em;}\ 103 | .ggs-16 div{left:0.75em;}\ 104 | #ggs-baseline-container {opacity: '+guideOpacity+'; position: absolute; left:0; top:0; z-index: 8000; width: 100%; height: 100%; -webkit-transition: opacity 0.235s ease-out; -moz-transition: opacity 0.235s ease-out; -ms-transition: opacity 0.235s ease-out; transition: opacity 0.235s ease-out; overflow-y: hidden;}\ 105 | .ggs-line {border-top: 1px dotted '+guideColor+'; height: '+baselineGridHeight+'; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box;}\ 106 | @media screen and (max-width: '+(eightColBreakpoint)+'){.ggs-2,.ggs-6,.ggs-10,.ggs-14{display:none;}}\ 107 | @media screen and (max-width: '+(sixteenColBreakpoint)+'){.ggs-1,.ggs-3,.ggs-5,.ggs-7,.ggs-9,.ggs-11,.ggs-13,.ggs-15{display:none;}}\ 108 | '; 109 | 110 | /* Create guides */ 111 | for (i=0; i<=16; i++) { 112 | ender('body').append(ender('
')); 113 | }; 114 | ender('body').append(ender('
')); 115 | 116 | /* Append CSS */ 117 | (function(d,u) { 118 | if(d.createStyleSheet) { 119 | d.createStyleSheet( u ); 120 | } 121 | else { 122 | var css=d.createElement('style'); 123 | css.setAttribute("type","text/css"); 124 | css.appendChild(document.createTextNode(u)); 125 | d.getElementsByTagName("head")[0].appendChild(css); 126 | } 127 | }(document, styles)) 128 | 129 | /* Resize guides when window size changes */ 130 | ender(window).on('resize', setHeights); 131 | 132 | /* Add listeners for switch element */ 133 | ender('#ggs-switch').click(function(){ 134 | if (ender('body').hasClass('ggs-hidden')) { 135 | ender('body').removeClass('ggs-hidden'); 136 | setHeights(); 137 | setTimeout( 138 | function () { 139 | ender('body').removeClass('ggs-animated'); 140 | }, 141 | 20 142 | ); 143 | } 144 | else { 145 | ender('body').addClass('ggs-animated'); 146 | setTimeout( 147 | function () { 148 | ender('body').addClass('ggs-hidden'); 149 | }, 150 | 300 151 | ); 152 | } 153 | }); 154 | 155 | }); -------------------------------------------------------------------------------- /goldengridsystem.com/assets/GGS.less: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Golden Grid System (1.01) 4 | * by Joni Korpi 5 | * licensed under MIT 6 | * 7 | */ 8 | 9 | @import 'helpful-LESS-functions.less'; 10 | 11 | // 12 | // Important numbers 13 | // 14 | @line: 24; 15 | @column: 100% / 18; 16 | @font-size: 16; 17 | @em: @font-size*1em; 18 | 19 | /* 20 | * 21 | * Margin, padding, and border resets 22 | * except for form elements 23 | * 24 | */ 25 | 26 | body, 27 | div, 28 | h1, 29 | h2, 30 | h3, 31 | h4, 32 | h5, 33 | h6, 34 | p, 35 | blockquote, 36 | pre, 37 | dl, 38 | dt, 39 | dd, 40 | ol, 41 | ul, 42 | li, 43 | fieldset, 44 | form, 45 | label, 46 | legend, 47 | th, 48 | td, 49 | article, 50 | aside, 51 | figure, 52 | footer, 53 | header, 54 | hgroup, 55 | menu, 56 | nav, 57 | section { 58 | margin: 0; 59 | padding: 0; 60 | border: 0; 61 | } 62 | 63 | 64 | /* 65 | * 66 | * Consistency fixes 67 | * adopted from http://necolas.github.com/normalize.css/ 68 | * 69 | */ 70 | 71 | html { 72 | height: 100%; 73 | -webkit-text-size-adjust: 100%; 74 | -ms-text-size-adjust: 100%; 75 | } 76 | body { 77 | min-height: 100%; 78 | font-size: 100%; 79 | } 80 | article, aside, details, figcaption, figure, 81 | footer, header, hgroup, nav, section, audio, canvas, video { 82 | display: block; 83 | } 84 | sub, sup { 85 | font-size: 75%; 86 | line-height: 0; 87 | position: relative; 88 | vertical-align: baseline; 89 | } 90 | sup { 91 | top: -0.5em; 92 | } 93 | sub { 94 | bottom: -0.25em; 95 | } 96 | pre { 97 | white-space: pre; 98 | white-space: pre-wrap; 99 | word-wrap: break-word; 100 | } 101 | b, strong { 102 | font-weight: bold; 103 | } 104 | abbr[title] { 105 | border-bottom: 1px dotted; 106 | } 107 | input, textarea, button, select { 108 | margin: 0; 109 | font-size: 100%; 110 | line-height: normal; 111 | vertical-align: baseline; 112 | } 113 | button, 114 | html input[type="button"], 115 | input[type="reset"], 116 | input[type="submit"] { 117 | cursor: pointer; 118 | -webkit-appearance: button; 119 | } 120 | input[type="checkbox"], 121 | input[type="radio"] { 122 | -webkit-box-sizing: border-box; 123 | -moz-box-sizing: border-box; 124 | -o-box-sizing: border-box; 125 | -ms-box-sizing: border-box; 126 | box-sizing: border-box; 127 | } 128 | textarea { 129 | overflow: auto; 130 | } 131 | table { 132 | border-collapse: collapse; 133 | border-spacing: 0; 134 | } 135 | 136 | 137 | /* 138 | * 139 | * Simple fluid media 140 | * 141 | */ 142 | 143 | figure { 144 | position: relative; 145 | } 146 | figure img, figure object, figure embed, figure video { 147 | max-width: 100%; 148 | display: block; 149 | } 150 | img { 151 | border: 0; 152 | -ms-interpolation-mode: bicubic; 153 | } 154 | 155 | 156 | /* 157 | * 158 | * Simple elastic gutters 159 | * Note: box-sizing will not work in IE6-8 160 | * 161 | */ 162 | 163 | .wrapper { 164 | padding: 0 (@line/2)/@em; 165 | -webkit-box-sizing: border-box; 166 | -moz-box-sizing: border-box; 167 | -o-box-sizing: border-box; 168 | -ms-box-sizing: border-box; 169 | box-sizing: border-box; 170 | } 171 | 172 | 173 | /* 174 | * 175 | * Zoomable baseline grid 176 | * type size presets 177 | * 178 | */ 179 | 180 | body { 181 | font-size: @font-size / 16 * 1em; // 16px 182 | line-height: @line / @em; // 24 px 183 | } 184 | 185 | .small, small, code, #copyright p { 186 | font-size: (@font-size*0.8125) / @em; // 13px 187 | line-height: (@line*0.75) / (@font-size*0.8125) * 1em; // 18px 188 | } 189 | 190 | .normal, h4, h3 { 191 | font-size: @font-size / @em; // 16px 192 | line-height: @line / @em; // 24px 193 | } 194 | 195 | .large, h2, h1 { 196 | font-size: 26 / @em; // 26px 197 | line-height: (@line*1.5) / 26 * 1em; // 36 px 198 | } 199 | 200 | .huge { 201 | font-size: 42 / @em; // 42px 202 | line-height: (@line*2) / 42 * 1em; // 48 px 203 | } 204 | 205 | .massive { 206 | font-size: 68 / @em; // 68px 207 | line-height: (@line*3) / 68 * 1em; // 72 px 208 | } 209 | 210 | .gigantic { 211 | font-size: 110 / @em; // 110px 212 | line-height: (@line*5) / 110 * 1em; // 120 px 213 | } 214 | 215 | /* 216 | * 217 | * Typography 218 | * 219 | */ 220 | 221 | body, input, textarea, button, select { 222 | font-family: ff-dagny-web-pro, sans-serif; 223 | } 224 | 225 | pre, code { 226 | font-family: Menlo, Monaco, monospace; 227 | } 228 | 229 | article p, #content figure, #content header p { 230 | margin-bottom: 24/@em; 231 | -webkit-hyphens: auto; 232 | -moz-hyphens: auto; 233 | hyphens: auto; 234 | } 235 | 236 | article p:last-child { 237 | margin-bottom: 0; 238 | } 239 | 240 | #content header p { 241 | padding-bottom: 23/@em; 242 | border-bottom: 1/@em dotted @body; 243 | margin: 0; 244 | } 245 | 246 | h2 { 247 | margin-bottom: 12 / 26*1em; 248 | } 249 | 250 | h3 { 251 | margin: 48/@em 0 24/@em; 252 | } 253 | 254 | #download h3, #guide h3 { 255 | margin: 24/@em 0 0; 256 | } 257 | 258 | #colophon h3 { 259 | border-bottom: 1/@em dotted @aside; 260 | margin: 0 0 11/@em; 261 | } 262 | 263 | 264 | /* 265 | * 266 | * Colours 267 | * 268 | */ 269 | 270 | @background: rgb(255,254,250); 271 | 272 | @body: rgb(61,60,56); 273 | @emphasis: rgb(23,20,9); 274 | @aside: rgb(158,156,149); 275 | 276 | @link: rgb(255,195,0); 277 | @gold: rgb(255,195,0); 278 | 279 | h1, h2, h3, strong, code { 280 | color: @emphasis; 281 | } 282 | 283 | #colophon { 284 | color: @aside; 285 | } 286 | 287 | #follow p, #colophon h3 { 288 | color: @background; 289 | } 290 | 291 | a { 292 | text-decoration: none; 293 | color: @emphasis; 294 | border-bottom: 2/@em solid @gold; 295 | } 296 | 297 | #colophon a { 298 | color: @gold; 299 | border-bottom-color: transparent; 300 | } 301 | 302 | a:hover { 303 | border-bottom-color: @emphasis; 304 | } 305 | 306 | #colophon a:hover { 307 | border-bottom-color: @gold; 308 | } 309 | 310 | a:active { 311 | border-bottom-color: @gold; 312 | color: @gold; 313 | } 314 | 315 | #colophon a:active { 316 | border-bottom-color: @background; 317 | color: @background; 318 | } 319 | 320 | ::selection {background: @gold; color: @emphasis;} 321 | ::-moz-selection {background: @gold; color: @emphasis;} 322 | img::selection {background: transparent;} 323 | img::-moz-selection {background: transparent;} 324 | body {-webkit-tap-highlight-color: @gold;} 325 | 326 | 327 | /* 328 | * 329 | * Four-column grid active 330 | * ---------------------------------------- 331 | * Margin | # 1 2 3 4 | Margin 332 | * 5.55555% | % 25 50 75 100 | 5.55555% 333 | * 334 | */ 335 | 336 | body { 337 | background: @background; 338 | color: @body; 339 | } 340 | 341 | #masthead, #content, .inner { 342 | margin: 0 @column; 343 | } 344 | 345 | .wrapper { 346 | position: relative; 347 | } 348 | 349 | #masthead { 350 | clear: both; 351 | padding: 36/@em 0 24/@em; 352 | } 353 | 354 | #guides { 355 | height: (120)/@em; 356 | position: relative; 357 | background: @emphasis; 358 | } 359 | 360 | .ggs-site-guide { 361 | height: 100%; 362 | position:absolute; 363 | top:0; 364 | z-index:9000; 365 | margin-left:-0.75em; 366 | border:solid @gold; 367 | background: @gold; 368 | border-width:0 0.75em; 369 | -webkit-transition: all 0.618s ease-out; 370 | -moz-transition: all 0.618s ease-out; 371 | -ms-transition: all 0.618s ease-out; 372 | -o-transition: all 0.618s ease-out; 373 | transition: all 0.618s ease-out; 374 | } 375 | 376 | .ggs-site-guide div{ 377 | background: @emphasis; 378 | width:2px; 379 | height:100%; 380 | position:absolute; 381 | left:-1px;top:0; 382 | } 383 | 384 | .ggs-site-0{left:0;} 385 | .ggs-site-1{left:11.11111111111111%;} 386 | .ggs-site-2{left:16.666666666666664%;} 387 | .ggs-site-3{left:22.22222222222222%;} 388 | .ggs-site-4{left:27.77777777777778%;} 389 | .ggs-site-5{left:33.33333333333333%;} 390 | .ggs-site-6{left:38.888888888888886%;} 391 | .ggs-site-7{left:44.44444444444444%;} 392 | .ggs-site-8{left:50%;} 393 | .ggs-site-9{left:55.55555555555556%;} 394 | .ggs-site-10{left:61.11111111111111%;} 395 | .ggs-site-11{left:66.66666666666666%;} 396 | .ggs-site-12{left:72.22222222222221%;} 397 | .ggs-site-13{left:77.77777777777777%;} 398 | .ggs-site-14{left:83.33333333333333%;} 399 | .ggs-site-15{left:88.88888888888889%;} 400 | .ggs-site-16{right:0;} 401 | 402 | .ggs-site-0,.ggs-site-16{width:5.555555555555555%;padding-right:0.75em;border:0;margin:0;} 403 | .ggs-site-0 div{left:auto;right:0.75em;} 404 | .ggs-site-16 div{left:0.75em;} 405 | 406 | @media screen and (max-width: 719px){ 407 | .ggs-site-2,.ggs-site-6,.ggs-site-10,.ggs-site-14{ 408 | -webkit-transform: scale(0, 1); 409 | -moz-transform: scale(0, 1); 410 | -ms-transform: scale(0, 1); 411 | -o-transform: scale(0, 1); 412 | transform: scale(0, 1); 413 | } 414 | } 415 | @media screen and (max-width: 1871px){ 416 | .ggs-site-1,.ggs-site-3,.ggs-site-5,.ggs-site-7,.ggs-site-9,.ggs-site-11,.ggs-site-13,.ggs-site-15{ 417 | -webkit-transform: scale(0, 1); 418 | -moz-transform: scale(0, 1); 419 | -ms-transform: scale(0, 1); 420 | -o-transform: scale(0, 1); 421 | transform: scale(0, 1); 422 | } 423 | } 424 | 425 | #content { 426 | margin-bottom: 48/@em; 427 | } 428 | 429 | #content header { 430 | padding-top: 48/@em; 431 | } 432 | 433 | #features figure { 434 | width: 100%; 435 | height: 192/@em; 436 | } 437 | 438 | .canvas { 439 | background: @emphasis; 440 | position: relative; 441 | height: 100%; 442 | overflow: hidden; 443 | } 444 | 445 | .gutter, .margin { 446 | height: 100%; 447 | width: 24/@em; 448 | background: @gold; 449 | position: absolute; 450 | left: 25%; top: 0; 451 | margin-left: 12/@em*-1; 452 | } 453 | 454 | .gutter2 { 455 | left: 50%; 456 | } 457 | 458 | .gutter3 { 459 | left: 75%; 460 | } 461 | 462 | .gutter div { 463 | height: 100%; 464 | position: absolute; 465 | left: 50%; top: 0; 466 | margin-left: 1/@em*-1; 467 | width: 2/@em; 468 | background: @emphasis; 469 | } 470 | 471 | .margin { 472 | left: 0; 473 | margin: 0; 474 | width: 12/@em; 475 | } 476 | 477 | .right { 478 | left: auto; right: 0; 479 | } 480 | 481 | .line { 482 | height: 23/@em; 483 | border-bottom: 1/@em dotted @gold; 484 | } 485 | 486 | .text { 487 | position: absolute; 488 | left: 12/@em; top: 24/@em; 489 | color: @gold; 490 | white-space: pre; 491 | } 492 | 493 | .twoLines { 494 | font-size: 42/@em; 495 | line-height: 48/42*1em; 496 | left: 12/42*1em; top: 48/42*1em; 497 | } 498 | 499 | .threeLines { 500 | font-size: 68/@em; 501 | line-height: 72/68*1em; 502 | left: 12/68*1em; top: 96/68*1em; 503 | } 504 | 505 | .fourLines { 506 | font-size: 110/@em; 507 | line-height: 120/110*1em; 508 | left: 12/110*1em; top: 168/110*1em; 509 | } 510 | 511 | .fiveLines { 512 | font-size: 178/@em; 513 | line-height: 168/178*1em; 514 | left: 12/178*1em; top: 288/178*1em; 515 | } 516 | 517 | .switch { 518 | position: absolute; 519 | right: 24/@em; top: 24/@em; 520 | width: 24/@em; 521 | } 522 | 523 | .switchBar { 524 | height: 4/@em; 525 | margin-bottom: 4/@em; 526 | background: @gold; 527 | } 528 | 529 | #folding .gutter1, #folding .gutter3 { 530 | background: none; 531 | border: dashed @gold; 532 | border-width: 0 1/@em; 533 | width: 22/@em; 534 | } 535 | 536 | #gutters .canvas { 537 | background: @emphasis; 538 | } 539 | 540 | #gutters .gutter, #gutters .margin { 541 | background: @gold; 542 | } 543 | 544 | #baseline .canvas { 545 | background: @emphasis; 546 | } 547 | 548 | #guide { 549 | clear: both; 550 | } 551 | 552 | #colophon { 553 | clear: both; 554 | padding: 24/@em 0 0; 555 | background: @emphasis; 556 | } 557 | 558 | #follow { 559 | margin-bottom: 24/@em; 560 | } 561 | 562 | #promoGroup .wrapper { 563 | margin-bottom: 24/@em; 564 | } 565 | 566 | #promoGroup p { 567 | padding-left: 84/@em; 568 | } 569 | 570 | #colophon img { 571 | width: 72/@em; 572 | height: 72/@em; 573 | float: left; 574 | .border-radius(3/@em); 575 | overflow: hidden; 576 | } 577 | 578 | 579 | #copyright { 580 | padding-bottom: 36/@em; 581 | } 582 | 583 | 584 | /* 585 | * 586 | * Fixes for IE6-8 587 | * http://jonikorpi.com/leaving-old-IE-behind/ 588 | * 589 | */ 590 | 591 | .ie body { 592 | width: 640px; 593 | margin: 0 auto; 594 | border: solid @body; 595 | border-width: 0 1/@em; 596 | font-size: (@font-size + 1) / @em; 597 | } 598 | 599 | 600 | /* 601 | * 602 | * Zoom baseline grid to 17/16 = 1.0625 603 | * 604 | */ 605 | 606 | @media screen and (min-width: 40em) { 607 | 608 | body { 609 | font-size: (@font-size + 1) / @em; 610 | } 611 | 612 | #guides { 613 | height: (192)/@em; 614 | } 615 | 616 | #colophon:after { 617 | content: " "; 618 | display: block; 619 | height: 0; 620 | visibility: hidden; 621 | clear: both; 622 | } 623 | 624 | #promoGroup { 625 | -webkit-box-sizing: border-box; 626 | -moz-box-sizing: border-box; 627 | -o-box-sizing: border-box; 628 | -ms-box-sizing: border-box; 629 | box-sizing: border-box; 630 | } 631 | 632 | #promoGroup, #follow, #copyright { 633 | width: 50%; 634 | float: left; 635 | } 636 | 637 | #promoGroup { 638 | float: right; 639 | } 640 | 641 | #copyright p { 642 | .normal(); 643 | } 644 | 645 | #promoGroup #promo, #copyright { 646 | margin-bottom: 48/@em; 647 | } 648 | 649 | } 650 | 651 | /* 652 | * 653 | * Eight-column grid active 654 | * ---------------------------------------------------------------------- 655 | * Margin | # 1 2 3 4 5 6 7 8 | Margin 656 | * 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555% 657 | * 658 | * 659 | */ 660 | 661 | @media screen and (min-width: 46.5em) { 662 | 663 | body { 664 | font-size: (@font-size) / @em; 665 | } 666 | 667 | #masthead .wrapper, #content .wrapper { 668 | margin: 0 12.5%; 669 | } 670 | 671 | #guides { 672 | height: (432)/@em; 673 | } 674 | 675 | #masthead { 676 | padding: 48/@em 0 36/@em; 677 | } 678 | 679 | h1 { 680 | .huge(); 681 | } 682 | 683 | #masthead p, #follow p { 684 | .large(); 685 | } 686 | 687 | #download h3 { 688 | float: left; 689 | margin: 0; 690 | clear: left; 691 | width: 84/@em; 692 | } 693 | 694 | #download div p { 695 | padding-left: 96/@em; 696 | margin-top: 24/@em; 697 | } 698 | 699 | } 700 | 701 | /* 702 | * 703 | * Zoom baseline grid to 17/16 = 1.0625 704 | * 705 | */ 706 | 707 | @media screen and (min-width: 55.5em) { 708 | 709 | body { 710 | font-size: (@font-size + 1) / @em; 711 | } 712 | } 713 | 714 | 715 | /* 716 | * 717 | * Reset baseline grid to 16/16 = 1.0 718 | * 719 | */ 720 | 721 | @media screen and (min-width: 61.5em) { 722 | 723 | body { 724 | font-size: (@font-size) / @em; 725 | } 726 | 727 | #masthead .wrapper, #content .wrapper { 728 | margin: 0; 729 | } 730 | 731 | #guides { 732 | height: (264)/@em; 733 | } 734 | 735 | #content { 736 | float: left; 737 | margin-bottom: 72/@em; 738 | } 739 | 740 | #content header { 741 | padding-top: 72/@em; 742 | } 743 | 744 | h2 { 745 | .huge(); 746 | margin-bottom: 12 / 42*1em; 747 | } 748 | 749 | #content header p { 750 | .large(); 751 | padding-bottom: 23/26*1em; 752 | border-bottom: 1/26*1em dotted @body; 753 | } 754 | 755 | #features section.wrapper { 756 | width: 50%; 757 | } 758 | 759 | #features section.wrapper:nth-of-type(2n) { 760 | margin-left: 50%; 761 | } 762 | 763 | #features figure { 764 | width: 100%; 765 | height: 100%; 766 | position: absolute; 767 | top: 0; right: -100%; 768 | } 769 | 770 | #features section.wrapper:nth-of-type(2n) figure { 771 | right: auto; left: -100%; 772 | } 773 | 774 | .canvas { 775 | margin: 0 12/@em; 776 | } 777 | 778 | #download div.wrapper { 779 | float: left; 780 | width: 25%; 781 | } 782 | 783 | #download h3 { 784 | float: none; 785 | clear: none; 786 | width: auto; 787 | margin: 24/@em 0 24/@em; 788 | } 789 | 790 | #download div p { 791 | padding: 0; 792 | } 793 | 794 | #guide { 795 | float: left; 796 | } 797 | 798 | #guide div.wrapper { 799 | width: 50%; 800 | float: left; 801 | } 802 | 803 | } 804 | 805 | 806 | /* 807 | * 808 | * Zoom baseline grid to 17/16 = 1.0625 809 | * 810 | */ 811 | 812 | @media screen and (min-width: 75em) { 813 | 814 | body { 815 | font-size: (@font-size + 1) / @em; 816 | } 817 | 818 | } 819 | 820 | 821 | /* 822 | * 823 | * Reset baseline grid to 16/16 = 1.0 824 | * 825 | */ 826 | 827 | @media screen and (min-width: 87em) { 828 | 829 | body { 830 | font-size: (@font-size) / @em; 831 | } 832 | 833 | #masthead, #content, .inner { 834 | margin-left: @column*3; 835 | margin-right: @column*3; 836 | } 837 | 838 | #download div.wrapper { 839 | width: 16.6666667%; 840 | } 841 | 842 | #download div p { 843 | .small(); 844 | } 845 | 846 | } 847 | 848 | /* 849 | * 850 | * Zoom baseline grid to 17/16 = 1.0625 851 | * 852 | */ 853 | 854 | @media screen and (min-width: 105em) { 855 | 856 | body { 857 | font-size: (@font-size + 1) / @em; 858 | } 859 | 860 | } 861 | 862 | 863 | /* 864 | * 865 | * Sixteen-column grid active 866 | * ---------------------------------------------------------------------------------------------------------------------- 867 | * Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin 868 | * 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555% 869 | * 870 | * 871 | */ 872 | 873 | @media screen and (min-width: 117em) { 874 | 875 | #masthead, #content, #colophon .inner { 876 | margin-left: @column*4; 877 | margin-right: @column*4; 878 | } 879 | 880 | 881 | #masthead { 882 | padding: 72/@em 0 48/@em; 883 | } 884 | 885 | h1 { 886 | .massive(); 887 | } 888 | 889 | #masthead p { 890 | .huge(); 891 | } 892 | 893 | #download div.wrapper { 894 | width: 20%; 895 | } 896 | 897 | #guides { 898 | height: (384)/@em; 899 | } 900 | 901 | #features header { 902 | padding-top: 48/@em; 903 | } 904 | 905 | } 906 | 907 | @media screen and (min-width: 130em) { 908 | 909 | #masthead, #content, #colophon .inner { 910 | margin-left: @column*5; 911 | margin-right: @column*5; 912 | } 913 | 914 | #download div.wrapper { 915 | width: 25%; 916 | } 917 | #download div p { 918 | .normal(); 919 | } 920 | 921 | } 922 | 923 | 924 | /* 925 | * 926 | * Zoom baseline grid to 18/16 = 1.125 927 | * 928 | */ 929 | @media screen and (min-width: 2496px) { 930 | 931 | body { 932 | font-size: (@font-size + 2) / @em; 933 | } 934 | 935 | } 936 | 937 | @media screen and (min-width: 3216px) { 938 | 939 | #masthead, #content, #colophon .inner { 940 | margin-left: @column*6; 941 | margin-right: @column*6; 942 | } 943 | 944 | #download div.wrapper { 945 | width: 16.6666667%; 946 | } 947 | #download div p { 948 | .small(); 949 | } 950 | 951 | } 952 | 953 | /* 954 | * 955 | * Zoom baseline grid to 19/16 = 1.1875 956 | * 957 | */ 958 | 959 | @media screen and (min-width: 4104px) { 960 | 961 | body { 962 | font-size: (@font-size + 3) / @em; 963 | } 964 | 965 | } 966 | 967 | @media screen and (min-width: 4440px) { 968 | 969 | body { 970 | position: relative; 971 | max-width: 5120px; 972 | } 973 | 974 | #masthead, #content, #colophon .inner { 975 | margin-left: @column*7; 976 | margin-right: @column*7; 977 | } 978 | 979 | #download div.wrapper { 980 | width: 25%; 981 | } 982 | #download div p { 983 | .normal(); 984 | } 985 | 986 | } -------------------------------------------------------------------------------- /goldengridsystem.com/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonikorpi/Golden-Grid-System/268f218cfe87816f894a196db2ccff6656e978d0/goldengridsystem.com/assets/favicon.png -------------------------------------------------------------------------------- /goldengridsystem.com/assets/helpful-LESS-functions.less: -------------------------------------------------------------------------------- 1 | /**/ 2 | // 3 | // 4 | // A collection of helpful LESS functions 5 | // by Joni Korpi 6 | // No rights reserved. 7 | // 8 | // 9 | 10 | 11 | .box-shadow (@string) { 12 | -webkit-box-shadow: @string; 13 | -moz-box-shadow: @string; 14 | box-shadow: @string; 15 | } 16 | 17 | .border-radius (@radius: 2px) { 18 | -webkit-border-radius: @radius; 19 | -moz-border-radius: @radius; 20 | border-radius: @radius; 21 | } 22 | 23 | .border-radiuses (@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) { 24 | -webkit-border-top-right-radius: @topright; 25 | -webkit-border-bottom-right-radius: @bottomright; 26 | -webkit-border-bottom-left-radius: @bottomleft; 27 | -webkit-border-top-left-radius: @topleft; 28 | -moz-border-radius-topright: @topright; 29 | -moz-border-radius-bottomright: @bottomright; 30 | -moz-border-radius-bottomleft: @bottomleft; 31 | -moz-border-radius-topleft: @topleft; 32 | border-top-right-radius: @topright; 33 | border-bottom-right-radius: @bottomright; 34 | border-bottom-left-radius: @bottomleft; 35 | border-top-left-radius: @topleft; 36 | } 37 | 38 | .rotate (@deg){ 39 | -webkit-transform: rotate(@deg); 40 | -moz-transform: rotate(@deg); 41 | -ms-transform: rotate(@deg); 42 | transform: rotate(@deg); 43 | } 44 | 45 | .skew (@deg, @deg2){ 46 | -webkit-transform: skew(@deg, @deg2); 47 | -moz-transform: skew(@deg, @deg2); 48 | -ms-transform: skew(@deg, @deg2); 49 | transform: skew(@deg, @deg2); 50 | } 51 | 52 | .translate (@x, @y:0) { 53 | -webkit-transform: translate(@x, @y); 54 | -moz-transform: translate(@x, @y); 55 | -ms-transform: translate(@x, @y); 56 | transform: translate(@x, @y); 57 | } 58 | 59 | .translate3d (@x, @y:0, @z:0) { 60 | -webkit-transform: translate3d(@x, @y, @z); 61 | -moz-transform: translate3d(@x, @y, @z); 62 | -ms-transform: translate3d(@x, @y, @z); 63 | transform: translate3d(@x, @y, @z); 64 | } 65 | 66 | .scale (@factor) { 67 | -webkit-transform: scale(@factor); 68 | -moz-transform: scale(@factor); 69 | -ms-transform: scale(@factor); 70 | transform: scale(@factor); 71 | } 72 | 73 | .perspective (@value:1000) { 74 | -webkit-perspective: @value; 75 | -moz-perspective: @value; 76 | -ms-perspective: @value; 77 | perspective: @value; 78 | } 79 | 80 | .transition (@transition) { 81 | -webkit-transition: @transition; 82 | -moz-transition: @transition; 83 | -ms-transition: @transition; 84 | transition: @transition; 85 | } 86 | 87 | .transform-origin (@x:center, @y:center) { 88 | -webkit-transform-origin: @x @y; 89 | -moz-transform-origin: @x @y; 90 | -ms-transform-origin: @x @y; 91 | transform-origin: @x @y; 92 | } 93 | 94 | .horizontal-gradient (@startColor: #555, @endColor: #333) { 95 | background-image: -webkit-gradient(linear, left top, right top, from(@startColor), to(@endColor)); 96 | background-image: -webkit-linear-gradient(right center, @startColor, @endColor); 97 | background-image: -moz-linear-gradient(right center, @startColor, @endColor); 98 | } 99 | 100 | .horizontal-three-color-gradient (@firstStop: 0, @startColor: #00b3ee, @midStop: 0.5, @midColor: #7a43b6, @lastStop: 1, @endColor: #c3325f) { 101 | background-repeat: no-repeat; 102 | background-image: -webkit-gradient(linear, left top, right top, 103 | color-stop(@firstStop, @startColor), 104 | color-stop(@midStop, @midColor), 105 | color-stop(@lastStop, @endColor)); 106 | background-image: -webkit-linear-gradient( 107 | @startColor @firstStop, 108 | @midColor @midStop, 109 | @endColor @lastStop); 110 | background-image: -moz-linear-gradient( 111 | @startColor @firstStop, 112 | @midColor @midStop, 113 | @endColor @lastStop); 114 | } 115 | 116 | .horizontal-four-color-gradient (@firstStop: 0, @startColor: #00b3ee, @secondStop: 0, @secondColor: #00b3ee, @midStop: 0.5, @midColor: #7a43b6, @lastStop: 1, @endColor: #c3325f) { 117 | background-repeat: no-repeat; 118 | background-image: -webkit-gradient(linear, left top, right top, 119 | color-stop(@firstStop, @startColor), 120 | color-stop(@secondStop, @secondColor), 121 | color-stop(@midStop, @midColor), 122 | color-stop(@lastStop, @endColor)); 123 | background-image: -webkit-linear-gradient( 124 | @startColor @firstStop, 125 | @secondColor @secondStop, 126 | @midColor @midStop, 127 | @endColor @lastStop); 128 | background-image: -moz-linear-gradient( 129 | @startColor @firstStop, 130 | @secondColor @secondStop, 131 | @midColor @midStop, 132 | @endColor @lastStop); 133 | } 134 | 135 | .vertical-gradient (@startColor: #555, @endColor: #333) { 136 | background-image: -webkit-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); 137 | background-image: -webkit-linear-gradient(@startColor, @endColor); 138 | background-image: -moz-linear-gradient(@startColor, @endColor); 139 | } 140 | 141 | .vertical-three-color-gradient (@startColor: #00b3ee, @colorStop: 0.5, @midColor: #7a43b6, @endColor: #c3325f) { 142 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); 143 | background-image: -webkit-linear-gradient(@startColor, color-stop(@colorStop, @midColor), @endColor); 144 | background-image: -moz-linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor); 145 | } -------------------------------------------------------------------------------- /goldengridsystem.com/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonikorpi/Golden-Grid-System/268f218cfe87816f894a196db2ccff6656e978d0/goldengridsystem.com/assets/icon.png -------------------------------------------------------------------------------- /goldengridsystem.com/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Golden Grid System 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | Golden Grid System 31 |

32 |

33 | A folding grid for responsive design. 34 |

35 |
36 |
37 | 38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 |
59 | 60 |
61 |
62 |

Four features

63 |

Columns, gutters, a baseline and a script.

64 |
65 |
66 |

Folding columns

67 | 68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |

Golden Grid System (GGS) splits the screen into 18 even columns. The leftmost and rightmost columns are used as the outer margins of the grid, which leaves 16 columns for use in design.

78 | 79 |

Now, 16 columns sounds a bit much for anything other than huge widescreen monitors. This is where the folding, inspired by the DIN paper system and Unigrid, comes in. The 16 columns can be combined, or folded, into 8 columns for tablet-sized screens, and into 4 columns for mobile-sized ones. This way GGS can easily cover any screen sizes from 240 up to 2560 pixels.

80 | 81 |

The dimensions of the grid in each configuration are noted down within CSS comments, accompanied by suitable media queries, like thus:

82 | 83 |
/*
 84 | *  Four-column grid active
 85 | *  ----------------------------------------
 86 | *  Margin   | #  1   2   3   4   |   Margin
 87 | *  5.55555% | %  25  50  75  100 | 5.55555%
 88 | */
 89 | 
90 |
91 |
92 |

Elastic gutters

93 | 94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | 104 |

While the column widths in GGS are proportional to the screen's width, the widths of its gutters (the spaces between columns) are proportional to the page's font-size, specified in ems.

105 | 106 |

Responsive grids that use gutters proportional to the screen can make the content feel like it's being squeezed together or pulled apart as the screen width changes. With elastic gutters this just doesn't happen, as the gutters always stay in proportion to the content.

107 | 108 |

Elastic gutters are created by positioning elements in the center of the gutter (using percentages) and giving them a padding equal to half of the gutter's width. For example:

109 | 110 |
.wrapper {
111 |     box-sizing: border-box; /* + vendor prefixes */
112 |     width: 50%;
113 |     margin-left: 25%;
114 |     /* Assuming gutter width = 1.5em */
115 |     padding: 0 0.75em;
116 | }
117 | 
118 |
119 |
120 |

Zoomable baseline grid

121 | 122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ123581321345589144233377610
140 |
ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ
141 |
ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ
142 |
ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ
143 |
ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ
144 |
145 |
146 | 147 |

Responsive layouts often require you to change the font-size at certain screen widths, for example to make the text easier to read on huge monitors, or to make the text fit better onto narrow mobile screens. This can make the proportions of your layout feel off, especially if you're using a baseline grid. GGS's zoomable baseline grid gets around this problem.

148 | 149 |

If you specify all your font-sizes, line-heights, as well as vertical paddings, margins and borders in ems, they'll all scale in proportion as the font-size is changed using media queries, always keeping the baseline grid intact (save for a 1px rounding error or two), which lets the layout keep the same vertical rhythm regardless of screen size.

150 | 151 |

GGS comes with a set of type presets aligned to a baseline grid, which is based on a base line-height of 1.5. Feel free to replace them with your own presets, though.

152 |
153 |
154 |

Golden Gridlet

155 | 156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | 166 |

Aligning elements in responsive layouts can be difficult with all the percentage values flying around. GGS comes with Golden Gridlet, a little script that adds a button into the upper right corner of the page. When clicked or tapped, it overlays the GGS grid and a baseline grid of 1.5em onto the page, making it easy to visually check that design elements align up.

167 | 168 |

Golden Gridlet should work in most modern browsers, and since it doesn't rely on a keyboard, it can be used on touch screen devices as well. In modern browsers, the overlay appears with a pleasing CSS3 transition. Give it a try by clicking or tapping the icon in the upper right corner of this page. It's pretty fun.

169 | 170 |

(Please note that due to rounding errors the baseline grid guides might not align up properly if the baseline grid is zoomed in or out.)

171 |
172 |
173 | 174 |
175 |
176 |

Four downloads

177 |

All hosted on Github.

178 |
179 |
180 |

GGS.html

181 | 182 |

Contains the required markup (namely the meta viewport tag) and a simple demo of the grid in use.

183 |
184 |
185 |

GGS.css

186 | 187 |

Contains the meat of GGS, with some demo code filled in. Details about its contents are included in CSS comments throughout the file.

188 |
189 |
190 |

191 | GGS.less / 192 | GGS.scss 193 |

194 | 195 |

Both contain the source of GGS.css. GGS.less is written using the LESS CSS language. GGS.scss is written using the SCSS language, and was contributed by mikker.

196 |
197 |
198 |

GGS.js

199 | 200 |

Contains Golden Gridlet, a script that overlays the GGS grid and a baseline grid of 1.5em onto the page. Can be customized around the top of the file. Powered by the Ender library.

201 |
202 |
203 | 204 |
205 |
206 |

Many useful tips

207 |

And answers to some FAQs.

208 |
209 |
210 | 211 |

Don't use GGS as it is.

212 | 213 |

Take it apart, steal the parts that you like, and adapt them to your own way of working.

214 | 215 |

Fluid design is hard.

216 | 217 |

Really hard. Don't give up. Read Fluid Grids and Responsive Web Design by Ethan Marcotte. They help a lot.

218 | 219 |

Don't set a max-width.

220 | 221 |

Or at least don't set one below 2560px. When your content starts getting too wide, use the zoomable baseline grid to make it fit a little better, or add some empty columns on the sides. The whole point of a fluid grid is to use the screen's proportions to align elements, so stick to it.

222 | 223 |

Mobile Safari causing trouble?

224 | 225 |

Does your site zoom in too much when changing orientations on an iOS device? It's because of this Mobile Safari bug.

226 | 227 |
228 |
229 | 230 |

GGS actually does very little.

231 | 232 |

It’s definitely not a framework. It’s more just a starting point and a couple of guidelines.

233 | 234 |

Serve IE6–8 just the mobile layout.

235 | 236 |

Old IE won't see any styles that are inside a media query, so just serve it your mobile layout and enhance it a little with IE-specific classes. Not having to worry about old IE makes coding the wider layouts so much easier. More about this in my blog post: Leaving Old Internet Explorer Behind.

237 | 238 |

Use box-sizing: border-box;

239 | 240 |

It lets you give the same element both a width in percentages as well as a padding in ems, which is required for the elastic gutters to work. If you followed my advice about IE6–8 above, you can use this inside media queries without worrying about browser support.

241 | 242 |

Don’t confuse GGS with "The Golden Grid".

243 | 244 |

The Golden Grid, made by @vladocar, is also a grid system. It has nothing to do with GGS. Accidental naming conflict. My fault.

245 | 246 |
247 |
248 | 249 |
250 | 251 |
252 |
253 | 254 |
255 |

256 | Follow @jonikorpi on Twitter to stay up to date with Golden Grid System. 257 |

258 |
259 | 260 |
261 |
262 |

Developed by

263 | 264 | Avatar 265 | 266 |

267 | Joni Korpi
268 | A web designer from Espoo, Finland. Fairly obsessed with grids, typography and geometry. 269 |

270 |
271 |
272 |

Also check out

273 | 274 | Icon 275 | 276 |

277 | Frameless
278 | A non-fluid grid for adaptive web design; adapts column by column, not pixel by pixel. 279 |

280 |
281 |
282 | 283 | 286 | 287 |
288 |
289 | 290 | 303 | 304 | 305 | 306 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Joni Korpi 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Golden Grid System 2 | 3 | A fluid-width grid system composed out of 18 even columns, two of which are used as outer margins, leaving 16 columns for use in design, which in turn can be combined into 8 columns or 4 columns as needed. They could also be doubled into 32 columns, but I don't think anyone needs a grid for 5000 CSS-px wide sites. 4 | 5 | See for more details. 6 | 7 | ## File list 8 | 9 | - **GGS.html** contains the required markup (namely the meta viewport tag) and a simple demo. 10 | - **GGS.css** contains the meat of GGS, with some demo code filled in. Details about its contents are scattered in CSS comments throughout the file. 11 | - **GGS.less** is the [LESS](http://lesscss.org/) source of GGS.css. It offers some customization for power users, and works as a nice starting point for LESS users. 12 | - **GGS.scss** is the same as GGS.less, but written in SCSS instead. Contributed by [mikker](https://github.com/mikker). 13 | - **GGS.js** contains Golden Gridlet, a script that overlays the GGS grid and a baseline grid of 1.5em onto the page. Can be customized around the top of the file. Powered by the [Ender library](http://ender.no.de/). 14 | - **goldengridsystem.com/** contains the source of the GGS site. 15 | 16 | ## Credits 17 | 18 | Developed by [Joni Korpi](http://jonikorpi.com/) / [@jonikorpi](http://twitter.com/jonikorpi/). Licensed under [MIT](http://opensource.org/licenses/mit-license.php). 19 | --------------------------------------------------------------------------------