2.0_beta sync to rsa
[framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / content / content-themes.html
1 <!DOCTYPE html> 
2 <html>
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1"> 
6         <title>jQuery Mobile Docs - Content Themes</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head> 
15 <body> 
16
17         <div data-role="page" class="type-interior">
18
19                 <div data-role="header" data-theme="f">
20                 <h1>Theming content</h1>
21                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23         </div><!-- /header -->
24
25         <div data-role="content">
26                         <div class="content-primary">
27                 <h2>Theming the content area</h2>
28                 <p>The main content area of a page (container with the <code> data-role="content"</code> attribute) should be themed by adding the <code> data-theme</code> attribute to the <code> data-role="page"</code> container to ensure that the background colors are applied to the full page, regardless of the content length. (If you add the <code> data-theme</code> attribute to the content container, the background color will stop after the content. So there may be a gap in color between the content and fixed footer.)</p>
29                 <p>Additionally, the content area of a collapsible can be themed to match the theme of the collapsible header using the <code>data-content-theme</code> attribute.</p>
30
31 <code>
32 &lt;div data-role=&quot;page&quot; <strong> data-theme=&quot;a&quot;</strong> <strong>data-content-theme=&quot;a&quot;</strong>&gt;
33 </code>
34
35                 <h2>Theming collapsible blocks</h2>
36                 <p>To set the color of the collapsible header, add the <code> data-theme</code> attribute to the collapsible container. The icon and body are not currently themable through data attributes, but can be styled directly with custom css.</p>
37
38 <code>          
39 &lt;div data-role=&quot;collapsible&quot; data-collapsed=&quot;true&quot; <strong> data-theme=&quot;a&quot;&gt;</strong>
40 </code>
41                 <h2>Themed examples</h2>
42                 
43                 <p><strong>A</strong> theme swatch on content &amp; collapsible</p>
44                 <div class="ui-body ui-body-a">
45                         <h1>H1 Heading</h1>
46                         <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
47                         <div data-role="collapsible" data-collapsed="true" data-theme="a">
48                                 <h3>I'm a themed collapsible</h3>
49                                 <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
50                         </div><!-- /collapsible -->
51                         <div data-role="collapsible" data-theme="a" data-content-theme="a">
52                                 <h3>I'm a themed collapsible with a themed content</h3>
53                                 <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
54                         </div>
55                 </div><!-- /themed container -->
56                 
57                 <p><strong>B</strong> theme swatch on content &amp; collapsible</p>
58                 <div class="ui-body ui-body-b">
59                         <h1>H1 Heading</h1>
60                         <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
61                         <div data-role="collapsible" data-collapsed="true" data-theme="b">
62                                 <h3>I'm a themed collapsible</h3>
63                                 <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
64                         </div><!-- /collapsible -->
65                         <div data-role="collapsible" data-theme="b" data-content-theme="b">
66                                 <h3>I'm a themed collapsible with a themed content</h3>
67                                 <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
68                         </div>
69                 </div><!-- /themed container -->
70                 
71                 <p><strong>C</strong> theme swatch on content &amp; collapsible</p>
72                 <div class="ui-body ui-body-c">
73                         <h1>H1 Heading</h1>
74                         <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
75                         <div data-role="collapsible" data-collapsed="true" data-theme="c">
76                                 <h3>I'm a themed collapsible</h3>
77                                 <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
78                         </div><!-- /collapsible -->
79                         <div data-role="collapsible" data-theme="c" data-content-theme="c">
80                                 <h3>I'm a themed collapsible with a themed content</h3>
81                                 <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
82                         </div>
83                 </div><!-- /themed container -->
84                 
85                 <p><strong>D</strong> theme swatch on content &amp; collapsible</p>
86                 <div class="ui-body ui-body-d">
87                         <h1>H1 Heading</h1>
88                         <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
89                         <div data-role="collapsible" data-collapsed="true" data-theme="d">
90                                 <h3>I'm a themed collapsible</h3>
91                                 <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
92                         </div><!-- /collapsible -->
93                         <div data-role="collapsible" data-theme="d" data-content-theme="d">
94                                 <h3>I'm a themed collapsible with a themed content</h3>
95                                 <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
96                         </div>
97                 </div><!-- /themed container -->
98                 
99                 <p><strong>E</strong> theme swatch on content &amp; collapsible</p>
100                 <div class="ui-body ui-body-e">
101                         <h1>H1 Heading</h1>
102                         <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
103                         <div data-role="collapsible" data-collapsed="true" data-theme="e">
104                                 <h3>I'm a themed collapsible</h3>
105                                 <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
106                         </div><!-- /collapsible -->
107                         <div data-role="collapsible" data-theme="e" data-content-theme="e">
108                                 <h3>I'm a themed collapsible with a themed content</h3>
109                                 <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
110                         </div>
111                 </div><!-- /themed container -->
112                 
113         
114         </div><!--/content-primary -->          
115         
116         <div class="content-secondary">
117                 
118                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
119                         
120                                 <h3>More in this section</h3>
121                                 
122                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
123                                 
124                                                 <li data-role="list-divider">Content Formatting</li>
125                                                 <li><a href="content-html.html">Basic HTML styles</a></li>
126                                                 <li><a href="content-grids.html">Layout grids (columns)</a></li>
127                                                 <li><a href="content-collapsible.html">Collapsible content blocks</a></li>
128                                                 <li><a href="content-collapsible-set.html">Collapsible sets (accordions)</a></li>
129                                                 <li data-theme="a"><a href="content-themes.html">Theming content</a></li>
130         
131                                 </ul>
132                 </div>
133         </div>          
134
135 </div><!-- /content -->
136
137 <div data-role="footer" class="footer-docs" data-theme="c">
138                 <p>&copy; 2011-12 The jQuery Foundation</p>
139 </div>
140         
141 </div><!-- /page -->
142
143 </body>
144 </html>