Skip to content

Commit 7ae63cb

Browse files
committed
Updated grid documentation to explain that we're using additional classes an styles, just for illustraiton purposes.
1 parent faf0d6a commit 7ae63cb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/content/content-grids.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ <h1>Layout grids</h1>
2626
<p>Using multiple column layouts isn't generally recommended on a mobile device because of the narrow screen width, but there are times where you may need to place small elements side-by-side (like buttons or navigation tabs, for example). </p>
2727

2828
<p>The jQuery Mobile framework provides a simple way to build CSS-based columns through a block style class convention called <code>ui-grid</code>. </p>
29+
2930
<p>There are two preset configurations layouts &mdash; two-column (using the <code>class</code> of <code>ui-grid-a</code>), and three-column (using the <code>class</code> of <code>ui-grid-b</code>) &mdash; that can be used in any situation that requires columns. Grids are 100% width, completely invisible (no borders or backgrounds) and don't have padding or margins, so they shouldn't interfere with the styles of elements placed inside them.</p>
3031

3132
<h2>Two column grids</h2>
@@ -47,7 +48,7 @@ <h2>Two column grids</h2>
4748
<div class="ui-block-b"><strong>I'm Block B</strong> and text inside will wrap.</div>
4849
</div><!-- /grid-a -->
4950

50-
<p>As you see above, by default grid blocks have no styles for appearance; they simply present content side-by-side.</p>
51+
<p>As you see above, by default grid blocks have no visual styling; they simply present content side-by-side.</p>
5152

5253
<p>Grid classes can be applied to any container. In this next example, we add <code>ui-grid-a</code> to a <code>fieldset</code>, and apply the <code>ui-block</code> classes to the two buttons inside to stretch them each to 50% of the screen width:</p>
5354

@@ -64,15 +65,15 @@ <h2>Two column grids</h2>
6465
</fieldset>
6566

6667

67-
<p>And, grid blocks can adopt presentation styles from the <a href="../themes/index.html">theming system</a> &mdash; by adding a height and color swatch reference to the grid blocks, we can achieve this style appearance:</p>
68+
<p>Theme classes (not data-theme attributes) from the <a href="../themes/index.html">theming system</a> can be added to an element, including grids. On the blocks below, we're adding two classes: <code>ui-bar</code> to add the default bar padding and <code>ui-bar-e</code> to apply the background gradient and font styling for the "e" toolbar theme swatch. For illustration purposes, an inline <code>style="height:120px"</code> attribute is also added to each grid to set each to a standard height. </p>
6869

6970
<div class="ui-grid-a">
7071
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:120px">Block A</div></div>
7172
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:120px">Block B</div></div>
7273
</div><!-- /grid-a -->
7374

7475
<h2>Three-column grids</h2>
75-
<p>The other grid layout configuration uses <code>class=ui-grid-b</code> on the parent, and 3 child container elements, each with its respective <code>ui-block-a/b/c</code> class, to create a three-column layout (33/33/33%).</p>
76+
<p>The other grid layout configuration uses <code>class=ui-grid-b</code> on the parent, and 3 child container elements, each with its respective <code>ui-block-a/b/c</code> class, to create a three-column layout (33/33/33%). Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
7677

7778
<pre><code>
7879
&lt;div class=&quot;ui-grid-b&quot;&gt;
@@ -100,7 +101,7 @@ <h2>Three-column grids</h2>
100101

101102
<h2>Four-column grids</h2>
102103

103-
<p>A four-column, 25/25/25/25% grid is created by specifying <code>class=ui-grid-c</code> on the parent and adding a fourth block.</p>
104+
<p>A four-column, 25/25/25/25% grid is created by specifying <code>class=ui-grid-c</code> on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
104105

105106
<div class="ui-grid-c">
106107
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:120px">A</div></div>
@@ -110,7 +111,7 @@ <h2>Four-column grids</h2>
110111
</div><!-- /grid-c -->
111112

112113
<h2>Five-column grids</h2>
113-
<p>A five-column, 20/20/20/20/20% grid is created by specifying <code>class=ui-grid-d</code> on the parent and adding a fourth block.</p>
114+
<p>A five-column, 20/20/20/20/20% grid is created by specifying <code>class=ui-grid-d</code> on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.</p>
114115

115116
<div class="ui-grid-d">
116117
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:120px">A</div></div>

0 commit comments

Comments
 (0)