├── favicon.ico ├── img └── html5rocks.png ├── README.md ├── css └── screen.css ├── scripts └── css3-mediaqueries.js └── index.html /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crozynski/Fluid-Squares/HEAD/favicon.ico -------------------------------------------------------------------------------- /img/html5rocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crozynski/Fluid-Squares/HEAD/img/html5rocks.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fluid-Squares 2 | 3 | ## What is it? 4 | 5 | A fluid grid of square units using HTML and CSS. 6 | 7 | Fluid Squares preserves a unit's square proportion within a fluid layout. The number of columns also reduce to suit browser or device width using CSS media queries. 8 | 9 | It works on all modern desktop browsers. Media queries are written Mobile First. IE8 doesn't support media queries, so the css3-mediaqueries.js polyfill is temporarily included. 10 | 11 | See [www.fluidsquares.com](http://www.fluidsquares.com) for more. 12 | 13 | ## What problem does Fluid Squares fix? 14 | 15 | Without a fix, the result of reducing a browser window's width squashes a fluid grid's squares into rectangles. 16 | 17 | To fix this each unit's padding-bottom size is set to match its width in percentages. On top of that each unit is a percentage of the global container to determine how many columns there are. 18 | 19 | Setting a unit's width to 25% and padding-bottom to 25% will give you four units in a row that will remain square regardless of screen size or browser window resizing. 20 | 21 | ## The ingredients 22 | 23 | ### HTML 24 | 25 | The basic structure of each unit is a div for content, which is nested in an anchor element: 26 | 27 | ```` 28 | 29 |
content
30 |
31 | ```` 32 | 33 | If you don't want the entire unit to be a link, a class has been created for that purpose. Just remove the anchor element and add class="category" to the div instead. 34 | 35 | ```` 36 |
content
37 | ```` 38 | 39 | ### CSS 40 | 41 | Media queries control the number of columns displayed (1, 2, 3, and 4) on browser resize, as well as providing fine control over font sizes. 42 | 43 | It includes a cut down CSS reset to suit this bare bones grid. Replace with a fresh [Reset](http://meyerweb.com/eric/tools/css/reset/) or [Normalize](http://necolas.github.io/normalize.css/) and customise to suit your own needs. 44 | 45 | ### No wrapper? 46 | 47 | It uses the body tag as a wrapper, but would certainly work within a standard div wrapper or HTML5 block elements. -------------------------------------------------------------------------------- /css/screen.css: -------------------------------------------------------------------------------- 1 | /* Authors Craig Rozynski craigrozynski.com 2 | Marco Lago marcolago.com 3 | Version 2.0 2015-02-02 */ 4 | 5 | /* CSS Reset (customised) */ 6 | 7 | html, body, div, span, h1, h2, h3, h4, h5, h6, p, em, img, small, strong { 8 | margin: 0; 9 | padding: 0; 10 | border: 0; 11 | font: inherit; 12 | vertical-align: baseline; 13 | } 14 | body { display: block; } 15 | html { overflow-y: scroll; } 16 | a:hover, a:active { outline: none; } 17 | small { font-size: 85%; } 18 | strong, th { font-weight: bold; } 19 | ::-moz-selection{ background: #3b7cbf; color: #fff; text-shadow: none; } 20 | ::selection { background: #3b7cbf; color: #fff; text-shadow: none; } 21 | a:link { -webkit-tap-highlight-color: #3b7cbf; } 22 | .ie7 img { -ms-interpolation-mode: bicubic; } 23 | h1, h2, h3, h4, h5, h6 { font-weight: 700; } 24 | 25 | /* Primary Styles */ 26 | 27 | body { 28 | padding: 10px; 29 | font: 1em "HelveticaNeue", "Helvetica Neue", Helvetica, Arial sans-serif; 30 | font-weight: 300; 31 | color: #515047; 32 | background-color: #F2F1DB; 33 | } 34 | a, a:link, a:visited, a:active, .title, .category { 35 | float: left; 36 | width: 100%; 37 | height: auto; 38 | margin-bottom: 30px; 39 | text-decoration: none; 40 | } 41 | h1, h2, h3 { 42 | font-size: 3em; 43 | font-weight: 700; 44 | } 45 | h1 { 46 | color: #515047; 47 | line-height: 0.8; 48 | letter-spacing: -0.05em; 49 | } 50 | h2 { 51 | color: #d4d3c0; 52 | line-height: 0.9; 53 | letter-spacing: -0.05em; 54 | } 55 | h3 { 56 | color: #3b7cbf; 57 | line-height: 0.9; 58 | letter-spacing: -0.05em; 59 | } 60 | p { 61 | font-size: 1.25em; 62 | line-height: 1.15; 63 | margin: 0.75em 0; 64 | color: #b9b8a4; 65 | } 66 | small { 67 | font-size: 1em; 68 | color: #3b7cbf; 69 | } 70 | img { max-width: 100%; } 71 | 72 | /* Media Queries */ 73 | 74 | /* Column Control Media Queries */ 75 | 76 | @media screen and (min-width:500px) { 77 | body { 78 | max-width: 1600px; 79 | margin: 0 auto; 80 | padding: 40px; 81 | overflow: hidden; 82 | } 83 | a { 84 | -webkit-transition: background-color .3s linear; 85 | -moz-transition: -color .3s linear; 86 | transition: background-color .3s linear; 87 | } 88 | a:hover { background-color: #e5e4cf; } 89 | a.title { background-color: #f2f1db; } 90 | a, a:link, a:visited, a:active, .title, .category { 91 | position: relative; 92 | top: 0; 93 | overflow: hidden; 94 | } 95 | div, h2 { position: absolute; } 96 | } 97 | 98 | /* Two Column */ 99 | 100 | @media screen and (min-width:500px) { 101 | a, a:link, a:visited, a:hover, a:active, .title, .category { 102 | width: 47%; 103 | margin: 0 3% 20px 0; 104 | padding-bottom: 47%; 105 | } 106 | } 107 | 108 | /* Three Column */ 109 | 110 | @media screen and (min-width:800px) { 111 | .title, .category, a, a:link, a:visited, a:hover, a:active { 112 | width: 31%; 113 | margin: 0 2% 20px 0; 114 | padding-bottom: 31%; 115 | } 116 | } 117 | 118 | /* Four Column */ 119 | 120 | @media screen and (min-width:1200px) { 121 | .title, .category, a, a:link, a:visited, a:hover, a:active { 122 | width: 23%; 123 | margin: 20px 2% 0 0; 124 | padding-bottom: 23%; 125 | } 126 | } 127 | 128 | /* Font Size Control Media Queries */ 129 | 130 | @media screen and (min-width:500px) { 131 | h1, h2, h3 { font-size: 2em; } 132 | p { font-size: 1em; line-height: 1.2; } 133 | } 134 | @media screen and (min-width:600px) { 135 | h1, h2, h3 { font-size: 2.5em; } 136 | } 137 | @media screen and (min-width:700px) { 138 | h1, h2, h3 { font-size: 3em; } 139 | p { font-size: 1.25em; } 140 | } 141 | @media screen and (min-width:800px) { 142 | h1, h2, h3 { font-size: 2.5em; } 143 | p { font-size: 1em; } 144 | } 145 | @media screen and (min-width:1000px) { 146 | h1, h2, h3 { font-size: 3.25em; } 147 | p { font-size: 1.25em; } 148 | } 149 | @media screen and (min-width:1200px) { 150 | p { font-size: 1em; } 151 | } 152 | @media screen and (min-width:1400px) { 153 | p { font-size: 1.25em; } 154 | } 155 | @media screen and (min-width:1600px) { 156 | h1, h2, h3 { font-size: 4em; } 157 | } 158 | 159 | -------------------------------------------------------------------------------- /scripts/css3-mediaqueries.js: -------------------------------------------------------------------------------- 1 | if(typeof Object.create!=="function"){ 2 | Object.create=function(o){ 3 | function F(){ 4 | }; 5 | F.prototype=o; 6 | return new F(); 7 | }; 8 | } 9 | var ua={toString:function(){ 10 | return navigator.userAgent; 11 | },test:function(s){ 12 | return this.toString().toLowerCase().indexOf(s.toLowerCase())>-1; 13 | }}; 14 | ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1]; 15 | ua.webkit=ua.test("webkit"); 16 | ua.gecko=ua.test("gecko")&&!ua.webkit; 17 | ua.opera=ua.test("opera"); 18 | ua.ie=ua.test("msie")&&!ua.opera; 19 | ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined"; 20 | ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined"; 21 | ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined"; 22 | var domReady=function(){ 23 | var _1=[]; 24 | var _2=function(){ 25 | if(!arguments.callee.done){ 26 | arguments.callee.done=true; 27 | for(var i=0;i<_1.length;i++){ 28 | _1[i](); 29 | } 30 | } 31 | }; 32 | if(document.addEventListener){ 33 | document.addEventListener("DOMContentLoaded",_2,false); 34 | } 35 | if(ua.ie){ 36 | (function(){ 37 | try{ 38 | document.documentElement.doScroll("left"); 39 | } 40 | catch(e){ 41 | setTimeout(arguments.callee,50); 42 | return; 43 | } 44 | _2(); 45 | })(); 46 | document.onreadystatechange=function(){ 47 | if(document.readyState==="complete"){ 48 | document.onreadystatechange=null; 49 | _2(); 50 | } 51 | }; 52 | } 53 | if(ua.webkit&&document.readyState){ 54 | (function(){ 55 | if(document.readyState!=="loading"){ 56 | _2(); 57 | }else{ 58 | setTimeout(arguments.callee,10); 59 | } 60 | })(); 61 | } 62 | window.onload=_2; 63 | return function(fn){ 64 | if(typeof fn==="function"){ 65 | _1[_1.length]=fn; 66 | } 67 | return fn; 68 | }; 69 | }(); 70 | var cssHelper=function(){ 71 | var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g}; 72 | var _4,_5=false; 73 | var _6=[]; 74 | var _7=function(fn){ 75 | if(typeof fn==="function"){ 76 | _6[_6.length]=fn; 77 | } 78 | }; 79 | var _8=function(){ 80 | for(var i=0;i<_6.length;i++){ 81 | _6[i](_4); 82 | } 83 | }; 84 | var _9={}; 85 | var _a=function(n,v){ 86 | if(_9[n]){ 87 | var _b=_9[n].listeners; 88 | if(_b){ 89 | for(var i=0;i<_b.length;i++){ 90 | _b[i](v); 91 | } 92 | } 93 | } 94 | }; 95 | var _c=function(_d,_e,_f){ 96 | if(ua.ie&&!window.XMLHttpRequest){ 97 | window.XMLHttpRequest=function(){ 98 | return new ActiveXObject("Microsoft.XMLHTTP"); 99 | }; 100 | } 101 | if(!XMLHttpRequest){ 102 | return ""; 103 | } 104 | var r=new XMLHttpRequest(); 105 | try{ 106 | r.open("get",_d,true); 107 | r.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest"); 108 | } 109 | catch(e){ 110 | _f(); 111 | return; 112 | } 113 | var _10=false; 114 | setTimeout(function(){ 115 | _10=true; 116 | },5000); 117 | document.documentElement.style.cursor="progress"; 118 | r.onreadystatechange=function(){ 119 | if(r.readyState===4&&!_10){ 120 | if(!r.status&&location.protocol==="file:"||(r.status>=200&&r.status<300)||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){ 121 | _e(r.responseText); 122 | }else{ 123 | _f(); 124 | } 125 | document.documentElement.style.cursor=""; 126 | r=null; 127 | } 128 | }; 129 | r.send(""); 130 | }; 131 | var _11=function(_12){ 132 | _12=_12.replace(_3.REDUNDANT_COMPONENTS,""); 133 | _12=_12.replace(_3.REDUNDANT_WHITESPACE,"$1"); 134 | _12=_12.replace(_3.MORE_WHITESPACE," "); 135 | _12=_12.replace(_3.FINAL_SEMICOLONS,"}"); 136 | return _12; 137 | }; 138 | var _13={mediaQueryList:function(s){ 139 | var o={}; 140 | var idx=s.indexOf("{"); 141 | var lt=s.substring(0,idx); 142 | s=s.substring(idx+1,s.length-1); 143 | var mqs=[],rs=[]; 144 | var qts=lt.toLowerCase().substring(7).split(","); 145 | for(var i=0;i-1&&_23.href&&_23.href.length!==0&&!_23.disabled){ 315 | _1f[_1f.length]=_23; 316 | } 317 | } 318 | if(_1f.length>0){ 319 | var c=0; 320 | var _24=function(){ 321 | c++; 322 | if(c===_1f.length){ 323 | _20(); 324 | } 325 | }; 326 | var _25=function(_26){ 327 | var _27=_26.href; 328 | _c(_27,function(_28){ 329 | _28=_11(_28).replace(_3.RELATIVE_URLS,"url("+_27.substring(0,_27.lastIndexOf("/"))+"/$1)"); 330 | _26.cssHelperText=_28; 331 | _24(); 332 | },_24); 333 | }; 334 | for(i=0;i<_1f.length;i++){ 335 | _25(_1f[i]); 336 | } 337 | }else{ 338 | _20(); 339 | } 340 | }; 341 | var _29={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"}; 342 | var _2a={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null}; 343 | var _2b=function(_2c,v){ 344 | if(_2a[_2c]!==null){ 345 | if(_29[_2c]==="array"){ 346 | return (_2a[_2c]=_2a[_2c].concat(v)); 347 | }else{ 348 | var c=_2a[_2c]; 349 | for(var n in v){ 350 | if(v.hasOwnProperty(n)){ 351 | if(!c[n]){ 352 | c[n]=v[n]; 353 | }else{ 354 | c[n]=c[n].concat(v[n]); 355 | } 356 | } 357 | } 358 | return c; 359 | } 360 | } 361 | }; 362 | var _2d=function(_2e){ 363 | _2a[_2e]=(_29[_2e]==="array")?[]:{}; 364 | for(var i=0;i<_4.length;i++){ 365 | _2b(_2e,_4[i].cssHelperParsed[_2e]); 366 | } 367 | return _2a[_2e]; 368 | }; 369 | domReady(function(){ 370 | var els=document.body.getElementsByTagName("*"); 371 | for(var i=0;i=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44)); 554 | }else{ 555 | return false; 556 | } 557 | }else{ 558 | return _46>0; 559 | } 560 | }else{ 561 | if("device-height"===_41.substring(l-13,l)){ 562 | _47=screen.height; 563 | if(_42!==null){ 564 | if(_43==="length"){ 565 | return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44)); 566 | }else{ 567 | return false; 568 | } 569 | }else{ 570 | return _47>0; 571 | } 572 | }else{ 573 | if("width"===_41.substring(l-5,l)){ 574 | _46=document.documentElement.clientWidth||document.body.clientWidth; 575 | if(_42!==null){ 576 | if(_43==="length"){ 577 | return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44)); 578 | }else{ 579 | return false; 580 | } 581 | }else{ 582 | return _46>0; 583 | } 584 | }else{ 585 | if("height"===_41.substring(l-6,l)){ 586 | _47=document.documentElement.clientHeight||document.body.clientHeight; 587 | if(_42!==null){ 588 | if(_43==="length"){ 589 | return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44)); 590 | }else{ 591 | return false; 592 | } 593 | }else{ 594 | return _47>0; 595 | } 596 | }else{ 597 | if("device-aspect-ratio"===_41.substring(l-19,l)){ 598 | return _43==="aspect-ratio"&&screen.width*_44[1]===screen.height*_44[0]; 599 | }else{ 600 | if("color-index"===_41.substring(l-11,l)){ 601 | var _48=Math.pow(2,screen.colorDepth); 602 | if(_42!==null){ 603 | if(_43==="absolute"){ 604 | return ((min&&_48>=_44)||(max&&_48<_44)||(!min&&!max&&_48===_44)); 605 | }else{ 606 | return false; 607 | } 608 | }else{ 609 | return _48>0; 610 | } 611 | }else{ 612 | if("color"===_41.substring(l-5,l)){ 613 | var _49=screen.colorDepth; 614 | if(_42!==null){ 615 | if(_43==="absolute"){ 616 | return ((min&&_49>=_44)||(max&&_49<_44)||(!min&&!max&&_49===_44)); 617 | }else{ 618 | return false; 619 | } 620 | }else{ 621 | return _49>0; 622 | } 623 | }else{ 624 | if("resolution"===_41.substring(l-10,l)){ 625 | var res; 626 | if(_45==="dpcm"){ 627 | res=_3d("1cm"); 628 | }else{ 629 | res=_3d("1in"); 630 | } 631 | if(_42!==null){ 632 | if(_43==="resolution"){ 633 | return ((min&&res>=_44)||(max&&res<_44)||(!min&&!max&&res===_44)); 634 | }else{ 635 | return false; 636 | } 637 | }else{ 638 | return res>0; 639 | } 640 | }else{ 641 | return false; 642 | } 643 | } 644 | } 645 | } 646 | } 647 | } 648 | } 649 | } 650 | }; 651 | var _4a=function(mq){ 652 | var _4b=mq.getValid(); 653 | var _4c=mq.getExpressions(); 654 | var l=_4c.length; 655 | if(l>0){ 656 | for(var i=0;i0){ 675 | s[c++]=","; 676 | } 677 | s[c++]=n; 678 | } 679 | } 680 | if(s.length>0){ 681 | _39[_39.length]=cssHelper.addStyle("@media "+s.join("")+"{"+mql.getCssText()+"}",false); 682 | } 683 | }; 684 | var _4e=function(_4f){ 685 | for(var i=0;i<_4f.length;i++){ 686 | _4d(_4f[i]); 687 | } 688 | if(ua.ie){ 689 | document.documentElement.style.display="block"; 690 | setTimeout(function(){ 691 | document.documentElement.style.display=""; 692 | },0); 693 | setTimeout(function(){ 694 | cssHelper.broadcast("cssMediaQueriesTested"); 695 | },100); 696 | }else{ 697 | cssHelper.broadcast("cssMediaQueriesTested"); 698 | } 699 | }; 700 | var _50=function(){ 701 | for(var i=0;i<_39.length;i++){ 702 | cssHelper.removeStyle(_39[i]); 703 | } 704 | _39=[]; 705 | cssHelper.mediaQueryLists(_4e); 706 | }; 707 | var _51=0; 708 | var _52=function(){ 709 | var _53=cssHelper.getViewportWidth(); 710 | var _54=cssHelper.getViewportHeight(); 711 | if(ua.ie){ 712 | var el=document.createElement("div"); 713 | el.style.position="absolute"; 714 | el.style.top="-9999em"; 715 | el.style.overflow="scroll"; 716 | document.body.appendChild(el); 717 | _51=el.offsetWidth-el.clientWidth; 718 | document.body.removeChild(el); 719 | } 720 | var _55; 721 | var _56=function(){ 722 | var vpw=cssHelper.getViewportWidth(); 723 | var vph=cssHelper.getViewportHeight(); 724 | if(Math.abs(vpw-_53)>_51||Math.abs(vph-_54)>_51){ 725 | _53=vpw; 726 | _54=vph; 727 | clearTimeout(_55); 728 | _55=setTimeout(function(){ 729 | if(!_3a()){ 730 | _50(); 731 | }else{ 732 | cssHelper.broadcast("cssMediaQueriesTested"); 733 | } 734 | },500); 735 | } 736 | }; 737 | window.onresize=function(){ 738 | var x=window.onresize||function(){ 739 | }; 740 | return function(){ 741 | x(); 742 | _56(); 743 | }; 744 | }(); 745 | }; 746 | var _57=document.documentElement; 747 | _57.style.marginLeft="-32767px"; 748 | setTimeout(function(){ 749 | _57.style.marginTop=""; 750 | },20000); 751 | return function(){ 752 | if(!_3a()){ 753 | cssHelper.addListener("newStyleParsed",function(el){ 754 | _4e(el.cssHelperParsed.mediaQueryLists); 755 | }); 756 | cssHelper.addListener("cssMediaQueriesTested",function(){ 757 | if(ua.ie){ 758 | _57.style.width="1px"; 759 | } 760 | setTimeout(function(){ 761 | _57.style.width=""; 762 | _57.style.marginLeft=""; 763 | },0); 764 | cssHelper.removeListener("cssMediaQueriesTested",arguments.callee); 765 | }); 766 | _3c(); 767 | _50(); 768 | }else{ 769 | _57.style.marginLeft=""; 770 | } 771 | _52(); 772 | }; 773 | }()); 774 | try{ 775 | document.execCommand("BackgroundImageCache",false,true); 776 | } 777 | catch(e){ 778 | } 779 | 780 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fluid Squares v2. A responsive grid experiment. 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

Fluid Squares

14 |

Fluid Squares preserves a unit's square proportion within a fluid layout. Number of columns also reduce to suit browser or device width using CSS media queries.

15 | More about Fluid Squares 16 |
17 |
18 | 19 | 20 |
21 |

V2

22 |

V1 used a transparent image with max-width:100%. Marco Lago stepped up with a clever CSS method that eliminates the need for images. This new version also uses css3-mediaqueries.js (now works in IE) and is Mobile First.

23 | Marco Lago's CSS method 24 |
25 |
26 | 27 |
28 |

HTML +
CSS +
JS =
HTML5

29 |
30 | 31 | 43 | 44 | 45 |
46 |

Dive into HTML5

47 |

Dive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. The final manuscript has been published...

48 | diveintohtml5.ep.io/ 49 |
50 |
51 | 52 | 53 |
54 |

HTML5 Rocks

55 |

Watch the sldeshow that let's you play with HTML5 features. Jump headfirst into HTML5 by experimenting with each API. A showroom of content that you can reuse...

56 | html5rocks.com 57 |
58 |
59 | 60 | 61 |
62 | 63 |
64 |
65 | 66 | 67 |
68 |

WHATWG HTML Living Standard

69 |

This specification evolves HTML and its related APIs to ease the authoring of Web-based applications...

70 | whatwg.org 71 |
72 |
73 | 74 | 75 |
76 |

HTML5 Spec for Web Devs

77 |

This HTML5 specification is like no other—It has been processed with you, the humble web developer, in mind...

78 | developers.whatwg.org 79 |
80 |
81 | 82 | 83 |
84 |

HTML5.org

85 |

HTML5 differences from HTML4.
WHATWG and HTML5 FAQ.
HTML5 validator.
HTML5 (changes) tracker...

86 | html5.org 87 |
88 |
89 | 90 | 91 |
92 |

HTML5 Shiv

93 |

Since HTML5 is getting more attention by way of marking up our new pages, and the only way to get IE to acknowledge the new elements...

94 | remysharp.com 95 |
96 |
97 | 98 | 99 |
100 |

Modernizr

101 |

Modernizr adds classes to the <html> element which allow you to target specific browser functionality in your stylesheet. You don't actually need to write any Javascript to use it...

102 | modernizr.com 103 |
104 |
105 | 106 | 107 |
108 |

HTML5 Polyfills

109 |

All the shims, fallbacks, and polyfills in order to implant html5 functionality in browsers that don't natively support them...

110 | github.com/Modernizr 111 |
112 |
113 | 114 | 115 |
116 |

HTML5 Boilerplate

117 |

Along with HTML5 Boilerplate's rock solid commitment to cross-browser consistency, H5BP brings you delicious documentation, a site optimizing build script...

118 | html5boilerplate.com 119 |
120 |
121 | 122 | 123 |
124 |

HTML5 Reset

125 |

Now that modern browsers are starting to support some of the really useful parts of HTML5 and CSS3, it's time for our best practices to catch up...

126 | html5reset.org/ 127 |
128 |
129 | 130 | 131 |
132 |

Initializr: Customise Boilerplate

133 |

Initializr is an HTML5 templates generator to help you getting started with an HTML5 project. It is built on HTML5 Boilerplate...

134 | initializr.com 135 |
136 |
137 | 138 | 139 |
140 |

Video for Everybody

141 |

Video for Everybody is simply a chunk of HTML code that embeds a video into a website using the HTML5 <video> element, falling back to Flash automatically...

142 | camendesign.com 143 |
144 |
145 | 146 | 147 |
148 |

HTML5 Browser Test

149 |

The HTML5 test score is only an indication of how well your browser supports the upcoming HTML5 standard and related specifications. It does not try to test all...

150 | html5test.com 151 |
152 |
153 | 154 | 155 |
156 |

Activating Browser Modes with Doctype

157 |

In order to deal both with content written according to Web standards...

158 | hsivonen.iki.fi 159 |
160 |
161 | 162 | 163 |
164 |

Live DOM Viewer

165 |

Markup to test. DOM view. Rendered view. innerHTML view. Log.

166 | software.hixie.ch 167 |
168 |
169 | 170 | 171 |
172 |

Centre your page without a wrapper

173 |

The number one suggestion I see from the proprietor of html5gallery.com to submitters is...

174 | camendesign.com 175 |
176 |
177 | 178 | 179 |
180 |

Pixels, ems, percentages, points

181 |

Pixel to em conversion made simple. Select your body font size. Voila! Your conversions. Oh la la! Custom conversions...

182 | pxtoem.com 183 |
184 |
185 | 186 | 187 |
188 |

Grid Calculator

189 |

Change the settings (by dragging the sliders, clicking on the bars, or editing the values) to calculate the overall width of your grid...

190 | www.29digital.net 191 |
192 |
193 | 194 | 195 |
196 |

Chrome Developer Tools

197 |

The Developer Tools, bundled and available in Chrome, allows web developers and programmers deep access...

198 | code.google.com/chrome 199 |
200 |
201 | 202 | 203 |
204 |

Eric Revisits Reset

205 |

It was close to four years ago now that I first floated (ha!), publicly refined, and then published at its own home what’s become known as...

206 | meyerweb.com 207 |
208 |
209 | 210 | 211 |
212 |

YUI Best Practices

213 |

The Exceptional Performance team has identified a number of best practices for making web pages fast. The list includes 35 best practices...

214 | developer.yahoo.com 215 |
216 |
217 | 218 | 219 |
220 |

Isobar Code Standards

221 |

This document contains normative guidelines for web applications built by the Interface Development practice of Isobar North America...

222 | na.isobar.com/standards 223 |
224 |
225 | 226 | 227 |
228 |

Google Code Uni

229 |

Read. Learn. Build. $.

230 | code.google.com/edu 231 |
232 |
233 | 234 |
235 | 236 |

CSS

237 |
238 | 239 | 240 |
241 |

CSS3, Please!

242 |

The Cross-Browser CSS3 Rule Generator. You can edit the underlined values in this css file, but don't worry about making sure the corresponding values match...

243 | css3please.com 244 |
245 |
246 | 247 | 248 |
249 |

CSS3 Generator

250 |

Another nice way to play with CSS3.

251 | css3generator.com 252 |
253 |
254 | 255 | 256 |
257 |

CSS3 Maker

258 |

Another nice way to play with CSS3.

259 | css3maker.com 260 |
261 |
262 | 263 | 264 |
265 |

CSS Gimmicks

266 |

Although CSS isn’t that difficult, useful CSS techniques are not easy to find. Sometimes finding a cross-browser solution might take time...

267 | smashingmagazine.com 268 |
269 |
270 | 271 | 272 |
273 |

Ceaser

274 |

CSS easing animation tool. Choose an easing type and test it out with a few effects. If you don’t quite like the easing, grab a handle and fix it...

275 | matthewlein.com/ceaser 276 |
277 |
278 | 279 | 280 |
281 |

Browser CSS Hacks

282 |

I don't use CSS hacks anymore. Instead I use IE's conditional comments to apply classes to the body tag. Nonetheless, I wanted to document every browser-specific...

283 | paulirish.com 284 |
285 |
286 | 287 | 288 |
289 |

Efficiently Rendering CSS

290 |

I admittedly don't think about this idea very often... how efficient is the CSS that we write, in terms of how quickly the browser can render it?

291 | css-tricks.com 292 |
293 |
294 | 295 | 296 |
297 |

CSS Spriting Tips

298 |

One of the most effective ways of speeding up a website’s render time is to reduce the number of HTTP requests required to fetch content. An effective method...

299 | blog.mozilla.com 300 |
301 |
302 | 303 | 304 |
305 |

CSS3 Pie

306 |

PIE makes Internet Explorer 6-8 capable of rendering several of the most useful CSS3 decoration features.

307 | css3pie.com 308 |
309 |
310 | 311 | 312 |
313 |

Selectivizr

314 |

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your...

315 | selectivizr.com 316 |
317 |
318 | 319 | 320 |
321 |

Webkit CSS Properties

322 |

Comprehensive list of -webkit properties.

323 | css-infos.net 324 |
325 |
326 | 327 | 328 | 329 |
330 |

HTML5 & CSS3 Browser Support

331 |

CSS3 properties and selectors. HTML5 web applications, graphics, embedded content, audio and video, form inputs and attributes...

332 | findmebyip.com/litmus 333 |
334 |
335 | 336 |
337 | 338 |

JavaScript

339 |
340 | 341 | 342 |
343 |

Crockford on JavaScript

344 |

Great collection of videos at YUI Theater, particularly from Douglas Crockford on Javascript.

345 | developer.yahoo.com 346 |
347 |
348 | 349 | 350 |
351 |

node.js

352 |

Node's goal is to provide an easy way to build scalable network programs. In the "hello world" web server example...

353 | nodejs.org 354 |
355 |
356 | 357 | 358 |
359 |

raphael.js

360 |

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you...

361 | raphaeljs.com 362 |
363 |
364 | 365 | 366 |
367 |

jsfiddle

368 |

JsFiddle is a playground for web developers, a tool which may be used in many ways. One can use it as an online editor for snippets...

369 | jsfiddle.net 370 |
371 |
372 | 373 | 374 |
375 |

jQuery

376 |

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development...

377 | jquery.com 378 |
379 |
380 | 381 | 382 | 383 |
384 |

jQuery for Designers

385 |

Learn how easy it is to apply web interaction using jQuery...

386 | jqueryfordesigners.com 387 |
388 |
389 | 390 | 391 |
392 |

Google JavaScript Style Guide

393 |

JavaScript is the main client-side scripting language used by many of Google's open-source projects...

394 | google-styleguide.googlecode.com 395 |
396 |
397 | 398 | 399 |
400 |

High Quality JavaScript

401 |

The brilliant Stoyan Stefanov, in promotion of his new book from O’Reilly, “JavaScript Patterns,” was kind enough to contribute an excerpt...

402 | net.tutsplus.com 403 |
404 |
405 | 406 | 407 |
408 |

JavaScript Garden

409 |

JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language...

410 | bonsaiden.github.com 411 |
412 |
413 | 414 | 415 |
416 |

MDN JavaScript

417 |

JavaScript® (sometimes shortened to JS) is a lightweight, object-oriented language, most known as the scripting language for web pages...

418 | developer.mozilla.org 419 |
420 |
421 | 422 | 423 |
424 |

Responsive Design

425 |
426 | 427 | 428 |
429 |

Responsive Web Design

430 |

The control which designers know in the print medium, and often desire in the web medium, is simply a function of the limitation of the printed page...

431 | alistapart.com 432 |
433 |
434 | 435 | 436 |
437 |

Media Queries Gallery

438 |

A collection of responsive web designs...

439 | mediaqueri.es 440 |
441 |
442 | 443 | 444 |
445 |

W3C CSS Media Queries

446 |

A media query consists of a media type and zero or more expressions that check for the conditions of particular media features...

447 | w3.org 448 |
449 |
450 | 451 | 452 |
453 |

Media Queries are Fool's Gold

454 |

Unfortunately, CSS media query is fool’s gold for mobile devices. It hides tough problems and gives developers a false...

455 | cloudfour.com 456 |
457 |
458 | 459 | 460 |
461 |

Fluid Grids

462 |

Early last year, I worked on the redesign of a rather content-heavy website. Design requirements were fairly light: the client as...

463 | alistapart.com 464 |
465 |
466 | 467 | 468 |
469 |

Fluid Images

470 |

I’ve always hated publishing. I don’t mean the industry, but the act. Hitting “print,” sending an email, pressing that “Publish” button on the CMS...

471 | unstoppablerobotninja.com 472 |
473 |
474 | 475 |
476 |

Grids

477 |
478 | 479 | 480 |
481 |

Grid Layout W3C Working Draft

482 |

Grid Layout contains features targeted at web application authors. The Grid can be used to achieve many different layouts...

483 | w3.org 484 |
485 |
486 | 487 | 488 | 489 |
490 |

Fluid 960 Grid System

491 |

Templates for Rapid Interactive Prototyping...

492 | designinfluences.com 493 |
494 |
495 | 496 | 497 |
498 |

Em-based Typographic Grid

499 |

Unlike most of the ready-made grid systems like BluePrint and 960.gs which are based on pixels — I wanted to base it all on ems...

500 | aplus.rs 501 |
502 |
503 | 504 | 505 |
506 |

YUI Grid Framework

507 |

The foundational YUI Grids CSS offers four preset page widths, six preset templates, and the ability to stack and nest subdivided regions of two, three...

508 | developer.yahoo.com 509 |
510 |
511 | 512 | 513 |
514 |

Tiny Fluid Grid

515 |

The happy and awesome way to build fluid grid based websites. Inspired by 1kbgrid.com. Developed with love by Girlfriend's overconfident...

516 | tinyfluidgrid.com 517 |
518 |
519 | 520 | 521 |
522 |

Less Framework

523 |

Less Framework is a CSS grid system for designing adaptive web­sites. It contains 4 layouts and 3 sets of typography presets, all based on a single grid...

524 | lessframework.com 525 |
526 |
527 | 528 | 529 | 530 |
531 |

Sub-Pixel Problems in CSS

532 |

Something that jumped at me, recently, was a rendering dilemma that browsers have to encounter, and gracefully handle, on a day-by-day basis with little...

533 | ejohn.org 534 |
535 |
536 | 537 | 538 |
539 |

Incredible Em & Elastic Layouts with CSS

540 |

Almost a year ago, Ty Gossman over at Stylegala asked me to write an article about elastic layouts. The best I could do was a quick email between work...

541 | jontangerine.com 542 |
543 |
544 | 545 |
546 | 547 |

Mobile

548 |
549 | 550 | 551 |
552 |

Rethinking the Mobile Web

553 |

This site is a proof of concept for many of the ideas described in Rethinking the Mobile Web...

554 | yiibu.com 555 |
556 |
557 | 558 | 559 | 560 |
561 |

Mobile First

562 |

For years, most Web teams have designed for the desktop. Mobile, if it even happened, was a port off the desktop version, designed and built before...

563 | lukew.com 564 |
565 |
566 | 567 | 568 |
569 |

Mobile Developers' Guide

570 |

This non-commercial brochure provides an overview on the different mobile technologies and platforms. 17 writers contributed their know-how...

571 | enough.de 572 |
573 |
574 | 575 | 576 |
577 |

The One Web Debate

578 |

There are two main camps in the mobile web: One Web and Mobile Web...

579 | cloudfour.com 580 |
581 |
582 | 583 | 584 | 585 |
586 |

State of the Mobile Web

587 |

Every month Opera conducts the definitive analysis of the key trends affecting the mobile Web worldwide. We publish these findings as...

588 | opera.com 589 |
590 |
591 | 592 | 593 |
594 |

W3C Mobile Web Best Practices

595 |

This document specifies Best Practices for delivering Web content to mobile devices....

596 | w3.org 597 |
598 |
599 | 600 | 601 |
602 |

Return of the Mobile Stylesheet

603 |

The past couple of years have seen numerous new web-capable mobile devices arise, including Apple’s iPhone and its Safari browser...

604 | alistapart.com 605 |
606 |
607 | 608 | 609 |
610 |

HTML5 Mobile Boilerplate

611 |

Mobile Boilerplate is your trusted template made custom for creating rich and performant mobile web apps...

612 | html5boilerplate.com/mobile 613 |
614 |
615 | 616 | 617 |
618 |

320 and Up boilerplate

619 |

‘320 and Up’ prevents mobile devices from downloading desktop assets by using a tiny screen’s...

620 | stuffandnonsense.co.uk 621 |
622 |
623 | 624 | 625 |
626 |

Mobile Framework Comparison

627 |

Web development vs. custom API frameworks. JQTouch, jQuery Mobile, PhoneGap, Sencha Touch, Titanium...

628 | dinosaurswithlaserz.com 629 |
630 |
631 | 632 | 633 |
634 |

Responsive Images

635 |

The goal of this technique is to deliver optimized, contextual image sizes for responsive layouts that utilize dramatically different...

636 | filamentgroup.com 637 |
638 |
639 | 640 | 641 |
642 |

Reformat Images for Mobile

643 |

Tinysrc a fast, easy - and free - way to reformat graphics and images for mobile devices....

644 | tinysrc.net 645 |
646 |
647 | 648 | 649 |
650 |

Multiple Screen Sizes

651 |

So you're a designer and have been tasked with the design of a mobile web site...

652 | mobiforge.com 653 |
654 |
655 | 656 | 657 |
658 |

Mobile browser CSS support

659 |

CSS contents and browser compatibility - mobile. My CSS tests, but now on mobile phones...

660 | quirksmode.org 661 |
662 |
663 | 664 | 665 |
666 |

StatCounter GlobalStats

667 |

Based on aggregate data collected on a sample exceeding 15 billion pageviews per month collected from across...

668 | gs.statcounter.com 669 |
670 |
671 | 672 | 673 |
674 |

AdMob Mobile Metrics

675 |

Over the past two years at AdMob, we’ve experienced the rapid growth in consumer usage of the the mobile...

676 | metrics.admob.com 677 |
678 |
679 | 680 | 681 |
682 |

W3C Mobile Web Best Practices

683 |

This document specifies Best Practices for delivering Web content to mobile devices..

684 | w3.org 685 |
686 |
687 | 688 | 689 |
690 |

Global Authoring Practices

691 |

This document gives general guidelines for web developers and content authors who are searching for directions to help create sites for the mobile web....

692 | www.passani.it 693 |
694 |
695 | 696 | 697 |
698 |

Smartphone Front-end Matrices

699 |

This spreadsheet provides smart-phone information matter to front end mobile web developers...

700 | spreadsheets.google.com 701 |
702 |
703 | 704 | 705 | 706 |
707 |

Optimise EDM for Mobile

708 |

Designing for the mobile web is nothing particularly new - or rare. With pretty much every decent handset available providing the...

709 | campaignmonitor.com 710 |
711 |
712 | 713 | 714 | 715 |
716 |

Quirksmode Mobile

717 |

This section contains my official mobile pages. They treat various aspects of mobile web development...

718 | quirksmode.org 719 |
720 |
721 | 722 | 723 |
724 |

W3C mobileOK Checker

725 |

This checker performs various tests on a Web Page to determine its level of mobile-friendliness. The tests are defined in the mobileOK Basic Tests 1.0 specification...

726 | validator.w3.org/mobile 727 |
728 |
729 | 730 | 731 |
732 |

User Agent Switcher

733 |

Chris Pederick's User Agent Switcher is an essential Firefox add-on for anybody in the business of creating mobile web sites...

734 | chrispederick.com 735 |
736 |
737 | 738 | 739 |
740 |

iPad Emulator

741 |

Browser-based iPad emulator...

742 | alexw.me 743 |
744 |
745 | 746 | 747 |
748 |

iPhone Emulator

749 |

This is a web browser based simulator for quickly testing your iPhone web applications...

750 | testiphone.com 751 |
752 |
753 | 754 | 755 |
756 |

HP/Palm webOS Emulator

757 |

Emulator accessible via webOS SDK...

758 | developer.palm.com 759 |
760 |
761 | 762 | 763 |
764 |

Android Emulator

765 |

Test your web app on Android, bypass Android's SDK (tested and works a charm).

766 | forum.xda-developers.com 767 |
768 |
769 | 770 | 771 |
772 |

BlackBerry Device Simulators

773 |

Welcome Developers! To view software for a BlackBerry product, please select a product from the drop down menu and click Select...

774 | swdownloads.blackberry.com 775 |
776 |
777 | 778 | 779 |
780 |

Windows Phone 7 Emulator

781 |

Emulator accessible via Windows Mobile 6 SDK...

782 | swdownloads.blackberry.com 783 |
784 |
785 | 786 | 787 |
788 |

Opera Mini Simulator

789 |

Browser-based demo of Opera Mini 6 that functions as it would when installed on a handset...

790 | opera.com 791 |
792 |
793 | 794 | 795 |
796 |

Symbian Emulator

797 |

Emulator accessible via Symbian SDK...

798 | forum.nokia.com 799 |
800 |
801 | 802 |
803 |

Typography

804 |
805 | 806 | 807 |
808 |

Elements of Typographic Style Applied to the Web

809 |

Great reference for laying out type on the web. The Vertical Motion chapter is particularly good.

810 | webtypography.net/toc 811 |
812 |
813 | 814 | 815 | 816 |
817 |

How to Size Text in CSS

818 |

In this article, we will reconcile the designer’s requirement for accuracy with the user’s need to resize text on demand, arriving at a best practice...

819 | alistapart.com 820 |
821 |
822 | 823 | 824 |
825 |

Typekit

826 |

This will change the way you design websites. Add a line of code to your pages and choose from hundreds of fonts. Simple, bulletproof, standards compliant, accessible, and totally legal.

827 | typekit.com 828 |
829 |
830 | 831 | 832 |
833 |

YUI 3: CSS Fonts

834 |

The foundational CSS Fonts provides cross-browser typographical normalization and control while still allowing users to choose and adjust their font size...

835 | developer.yahoo.com 836 |
837 |
838 | 839 | 840 | --------------------------------------------------------------------------------