mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-25 14:33:43 +00:00
Added docs for data-content-theme
This commit is contained in:
parent
e666552274
commit
66e63651a7
1 changed files with 25 additions and 3 deletions
|
|
@ -24,10 +24,12 @@
|
|||
<div class="content-primary">
|
||||
<h2>Theming the content area</h2>
|
||||
<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 to the <code> data-theme</code> 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>
|
||||
|
||||
<p>Additionally, the content area can be themed to match the theme of the collapsible header using the <code>data-content-theme</code> attribute.</p>
|
||||
|
||||
<code>
|
||||
<div data-role="page" <strong> data-theme="a"</strong>>
|
||||
</code>
|
||||
<div data-role="page" <strong> data-theme="a"</strong> <strong>data-content-theme="a"</strong>>
|
||||
</code>
|
||||
|
||||
<h2>Theming collapsible blocks</h2>
|
||||
<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>
|
||||
|
||||
|
|
@ -44,6 +46,10 @@
|
|||
<h3>I'm an themed collapsible</h3>
|
||||
<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>
|
||||
</div><!-- /collapsible -->
|
||||
<div data-role="collapsible" data-theme="a" data-content-theme="a">
|
||||
<h3>I'm a themed collapsible with a themed content</h3>
|
||||
<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>
|
||||
</div>
|
||||
</div><!-- /themed container -->
|
||||
|
||||
<p><strong>B</strong> theme swatch on content & collapsible</p>
|
||||
|
|
@ -54,6 +60,10 @@
|
|||
<h3>I'm an themed collapsible</h3>
|
||||
<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>
|
||||
</div><!-- /collapsible -->
|
||||
<div data-role="collapsible" data-theme="b" data-content-theme="b">
|
||||
<h3>I'm a themed collapsible with a themed content</h3>
|
||||
<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>
|
||||
</div>
|
||||
</div><!-- /themed container -->
|
||||
|
||||
<p><strong>C</strong> theme swatch on content & collapsible</p>
|
||||
|
|
@ -64,6 +74,10 @@
|
|||
<h3>I'm an themed collapsible</h3>
|
||||
<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>
|
||||
</div><!-- /collapsible -->
|
||||
<div data-role="collapsible" data-theme="c" data-content-theme="c">
|
||||
<h3>I'm a themed collapsible with a themed content</h3>
|
||||
<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>
|
||||
</div>
|
||||
</div><!-- /themed container -->
|
||||
|
||||
<p><strong>D</strong> theme swatch on content & collapsible</p>
|
||||
|
|
@ -74,6 +88,10 @@
|
|||
<h3>I'm an themed collapsible</h3>
|
||||
<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>
|
||||
</div><!-- /collapsible -->
|
||||
<div data-role="collapsible" data-theme="d" data-content-theme="d">
|
||||
<h3>I'm a themed collapsible with a themed content</h3>
|
||||
<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>
|
||||
</div>
|
||||
</div><!-- /themed container -->
|
||||
|
||||
<p><strong>E</strong> theme swatch on content & collapsible</p>
|
||||
|
|
@ -84,6 +102,10 @@
|
|||
<h3>I'm an themed collapsible</h3>
|
||||
<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>
|
||||
</div><!-- /collapsible -->
|
||||
<div data-role="collapsible" data-theme="e" data-content-theme="e">
|
||||
<h3>I'm a themed collapsible with a themed content</h3>
|
||||
<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>
|
||||
</div>
|
||||
</div><!-- /themed container -->
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue