revamp grids manual test

This commit is contained in:
Tilo Mitra 2013-08-22 16:59:37 -04:00
parent 6f7e767a2c
commit a0d940231a

View File

@ -3,171 +3,499 @@
<head>
<link rel="stylesheet" type="text/css" href="../../../../build/grids-min.css">
<title>Responsive Grids Test</title>
<style>
.content {
position: relative;
text-align: center;
border:solid #999;
border-width:1px;
color:#000;
margin: 15px 10px 15px 0; /*10px 10px 0 0; "column" gutters */
padding:5px 2px;
background: url(../assets/cssgrids/images/grid_text.png) repeat-x #F9F9F4;
z-index: 1;
}
.content label {
margin: 0 auto;
padding: 1px 6px;
font-weight: bold;
font-family: courier;
z-index: 2;
}
</style>
</head>
<body class="pure-g-r">
<div class="header pure-u-1">
<h1 class="pure-u-1">Pure Responsive Grids</h1>
<h2 class="pure-u">An example of making your Pure Grids behave responsively.</h2>
<body class="pure-skin-sam">
<h1>Base Grid</h1>
<div class="pure-g">
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
</div>
<div class='pure-g'>
<h1 class="pure-u-1 centered">How does it work?</h1>
<div class='pure-u-1'>
<div class='cell'>
<p>Pure Responsive Grids builds on top of the existing Pure Grids implementation. It adds a single new class name called <code>.pure-g-r</code>. You can use this instead of using <code>.pure-g</code> as you normally do. All elements with a class name of <code>.pure-u-*-*</code> will automatically become responsive if they are direct descendents of a <code>.pure-g-r.</code></p>
<h2>The HTML</h2>
<p>The first gist shows how regular Pure grids are written. These grids are unresponsive. They'll always be one-thirds irrespective of the width of the screen. The second gist replaces the <code>pure-g</code> with <code>pure-g-r</code>, thereby making the one-third columns collapse to full width on lower screen widths.</p>
</div>
<div class="pure-g">
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<h1 class="pure-u-1 centered">Features.</h1>
<div class="pure-u-1">
<div class="cell">
<ul>
<li>Adds configurable media queries for different screen widths (Desktops, Landscape Tablets, Portrait Tablets, Phones)</li>
<li>Collapses elements to 100% if smaller than a certain width (767px by default)</li>
<li>Adjusts images to fit on smaller screens</li>
<li>Works with as many columns as you want (or as few)</li>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-3-4">
<div class="content"><label>3/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-2-3">
<div class="content"><label>2/3</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-5">
<div class="content"><label>1/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-3-5">
<div class="content"><label>3/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-5-6">
<div class="content"><label>5/6</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-5-8">
<div class="content"><label>5/8</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-7-8">
<div class="content"><label>7/8</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-7-12">
<div class="content"><label>7/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-11-12">
<div class="content"><label>11/12</label></div>
</div>
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-24">
<div class="content"><label>1/24</label></div>
</div>
<div class="pure-u-5-24">
<div class="content"><label>5/24</label></div>
</div>
<div class="pure-u-7-24">
<div class="content"><label>7/24</label></div>
</div>
<div class="pure-u-11-24">
<div class="content"><label>11/24</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-17-24">
<div class="content"><label>17/24</label></div>
</div>
<div class="pure-u-7-24">
<div class="content"><label>7/24</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-19-24">
<div class="content"><label>19/24</label></div>
</div>
<div class="pure-u-5-24">
<div class="content"><label>5/24</label></div>
</div>
</div>
<div class="pure-g">
<div class="pure-u-23-24">
<div class="content"><label>23/24</label></div>
</div>
<div class="pure-u-1-24">
<div class="content"><label>1/24</label></div>
</div>
</div>
<h1>Responsive Grid</h1>
<div class="pure-g-r">
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-3-4">
<div class="content"><label>3/4</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-3">
<div class="content"><label>1/3</label></div>
</div>
<div class="pure-u-2-3">
<div class="content"><label>2/3</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-5">
<div class="content"><label>1/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-3-5">
<div class="content"><label>3/5</label></div>
</div>
<div class="pure-u-2-5">
<div class="content"><label>2/5</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-6">
<div class="content"><label>1/6</label></div>
</div>
<div class="pure-u-5-6">
<div class="content"><label>5/6</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-3-8">
<div class="content"><label>3/8</label></div>
</div>
<div class="pure-u-5-8">
<div class="content"><label>5/8</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-7-8">
<div class="content"><label>7/8</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
<div class="pure-u-1-8">
<div class="content"><label>1/8</label></div>
</div>
<div class="pure-u-1-4">
<div class="content"><label>1/4</label></div>
</div>
</div>
<div class="pure-g-r">
<h1 class="pure-u-1 centered">Example.</h1>
<div class="pure-foo pure-u-1-4">
<div class="cell">
<h3>Fast</h3>
<p>YUI's lightweight core and modular architecture make it scalable, fast, and robust. Built by frontend engineers at Yahoo!, YUI powers the most popular websites in the world.</p>
</div>
</div><!--/span-->
<div class="pure-u-1-4 pure-foo">
<div class="cell">
<h3>Complete</h3>
<p>YUI's intuitive and well-documented API takes you from basic DOM handling to building performant and maintainable applications on desktop browsers, mobile devices, and servers.</p>
</div>
</div><!--/span-->
<div class="pure-u-1-4">
<div class="cell">
<h3>Industrial Strength</h3>
<p>A thriving community, a carefully architected infrastructure, and a comprehensive suite of tools help you code like a pro, from simple web pages to complex web applications.</p>
</div>
</div><!--/span-->
<div class="pure-u-1-4">
<div class="cell">
<h3>Free and Open</h3>
<p>YUI is free for all uses and is developed in the open on GitHub. Core team members can always be found in the forums and the #yui IRC channel on Freenode. Pull requests welcome!</p>
</div>
</div><!--/span-->
<div class="pure-u-1 centered">
<img class="pure-u" src="http://lorempixel.com/800/400/" alt="test image">
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
</div>
<div class="pure-u-2-5">
<div class="cell">
<h3>Two-Fifth Column</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum dui turpis. Duis nulla dolor, suscipit in venenatis vitae, auctor eu nibh. Proin lobortis arcu nec tellus vehicula vitae pellentesque nisi molestie. Aenean felis ligula, hendrerit id dictum sed, ornare nec leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec non lectus et quam porttitor dignissim vitae ac odio. Aenean mattis dui porta lacus egestas ultricies. Mauris vel dolor libero, sit amet rhoncus nibh.</p>
<div class="pure-g-r">
<div class="pure-u-7-12">
<div class="content"><label>7/12</label></div>
</div>
<div class="pure-u-5-12">
<div class="content"><label>5/12</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-11-12">
<div class="content"><label>11/12</label></div>
</div>
<div class="pure-u-1-12">
<div class="content"><label>1/12</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-1-24">
<div class="content"><label>1/24</label></div>
</div>
<div class="pure-u-5-24">
<div class="content"><label>5/24</label></div>
</div>
<div class="pure-u-7-24">
<div class="content"><label>7/24</label></div>
</div>
<div class="pure-u-11-24">
<div class="content"><label>11/24</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-17-24">
<div class="content"><label>17/24</label></div>
</div>
<div class="pure-u-7-24">
<div class="content"><label>7/24</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-19-24">
<div class="content"><label>19/24</label></div>
</div>
<div class="pure-u-5-24">
<div class="content"><label>5/24</label></div>
</div>
</div>
<div class="pure-g-r">
<div class="pure-u-23-24">
<div class="content"><label>23/24</label></div>
</div>
<div class="pure-u-1-24">
<div class="content"><label>1/24</label></div>
</div>
</div>
<h1>Nested Grid</h1>
<div class="pure-g-r">
<div class="pure-u-1-2">
<div class="content">
<div class="pure-g">
<div class="pure-u-1-2">
<div class="content"><label>Nested 1/2</label></div>
</div>
<div class="pure-u-1-2">
<div class="content"><label>Nested 1/2</label></div>
</div>
</div>
</div>
</div>
<div class="pure-u-3-5">
<div class="cell">
<h3>Three-Fifth Column</h3>
<p>Quisque ac magna eget est porta varius ut eget quam. Curabitur tincidunt gravida nisl, vitae luctus velit vulputate vel. Aliquam sed sodales orci. Proin varius placerat magna tristique tincidunt. Morbi non dignissim felis. Proin bibendum libero nec felis eleifend porttitor. Morbi auctor venenatis justo, molestie luctus mi pulvinar nec. Pellentesque vitae ornare lacus. Nulla hendrerit tempor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis luctus facilisis cursus. Integer in lacinia dui. Phasellus ullamcorper, sem at congue pretium, velit sapien ornare mi, eu eleifend risus sapien ac eros.</p>
<p>Fusce accumsan, sem vitae tempus tempor, nulla lectus interdum felis, eget molestie urna mauris vel elit. Curabitur vel ipsum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam viverra, augue et sollicitudin dignissim, lectus tellus imperdiet lectus, a tempor ipsum mauris vitae augue. Nullam vel nulla a purus cursus consequat. Nulla orci elit, malesuada nec egestas non, ornare quis nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
</div>
</div>
</div>
<div class='pure-g'>
<h1 class="pure-u-1 centered">Grids on mobile</h1>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
</div>
<div class='pure-g'>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
</div>
<div class='pure-g'>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
<div class="pure-u-1-3">
<div class="cell">
<h4>Thirds</h4>
<p>This cell will be a grid even on mobile devices.</p>
</div>
</div>
</div>
<div class='pure-g-r'>
<h1 class="pure-u-1 centered">Helper Classes</h1>
<div class="pure-u-1 pure-hidden-phone">
<div class="cell">
<h4>No Phones Allowed</h4>
<p>Should be hidden on phones</p>
</div>
</div>
<div class="pure-u-1 pure-hidden-tablet">
<div class="cell">
<h4>No Tablets Allowed</h4>
<p>Should be hidden on tablets</p>
</div>
</div>
<div class="pure-u-1 pure-hidden-desktop">
<div class="cell">
<h4>No big screens allowed.</h4>
<p>Should be hidden on desktops/laptops</p>
</div>
<div class="pure-u-1-2">
<div class="content"><label>1/2</label></div>
</div>
</div>
</body>