You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
82
+
</div>
83
+
<divdata-role="collapsible">
84
+
<h3>Section G</h3>
85
+
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
86
+
87
+
</div>
88
+
<divdata-role="collapsible">
89
+
<h3>Section H</h3>
90
+
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
Copy file name to clipboardExpand all lines: docs/content/content-collapsible.html
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,9 @@ <h1>Collapsible content</h1>
25
25
26
26
<h2>Collapsible content markup</h2>
27
27
<p>To create a collapsible blocks of content, create a container and add the <code> data-role="collapsible"</code> attribute.</p>
28
-
28
+
29
+
<p>Using <code>data-content-theme</code> attribute allows you to set a theme for the content of the collapsible.</p>
30
+
29
31
<p>Directly inside this container, add any header element (H1-H6). The framework will style the header to look like a clickable button and add a "+" icon to the left to indicate it's expandable.</p>
30
32
31
33
<p>After the header, add any HTML markup you want to be collapsible. The framework will wrap this markup in a container that will be hidden/shown when the heading is clicked.</p>
@@ -63,9 +65,9 @@ <h3>I'm a header</h3>
63
65
<h2>Collapsible example</h2>
64
66
<p>This page has 4 collapsible containers with different types of content inside.</p>
65
67
66
-
<divdata-role="collapsible"data-collapsed="true">
68
+
<divdata-role="collapsible">
67
69
<h3>Section 1: Collapsed text block</h3>
68
-
<p>I'm closed when the page loads because I have the <code>data-collapsed="true"</code> attribute on my container. </p>
70
+
<p>I'm closed when the page loads because that's the default state of a collapsible.</p>
69
71
<p>I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. </p>
Copy file name to clipboardExpand all lines: docs/content/content-themes.html
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,12 @@ <h1>Theming content</h1>
24
24
<divclass="content-primary">
25
25
<h2>Theming the content area</h2>
26
26
<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>
27
-
27
+
<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>
<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>
33
35
@@ -44,6 +46,10 @@ <h1>H1 Heading</h1>
44
46
<h3>I'm an themed collapsible</h3>
45
47
<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>
ok(collapsibles.eq(0).find(".ui-collapsible-heading-toggle").hasClass("ui-btn-up-a"),"Heading of first collapsible should have class ui-btn-up-a");
150
+
ok(!collapsibles.eq(0).find(".ui-collapsible-content").hasClass("ui-btn-up-a"),"Content of first collapsible should NOT have class ui-btn-up-a");
151
+
ok(collapsibles.eq(0).find(".ui-collapsible-content").hasClass("ui-btn-up-d"),"Content of first collapsible should NOT have class ui-btn-up-d");
152
+
ok(collapsibles.eq(1).find(".ui-collapsible-heading-toggle").hasClass("ui-btn-up-b"),"Heading of second collapsible should have class ui-btn-up-b");
153
+
ok(collapsibles.eq(1).find(".ui-collapsible-content").hasClass("ui-btn-up-b"),"Content of second collapsible should have class ui-btn-up-b");
154
+
ok(collapsibles.eq(2).find(".ui-collapsible-heading-toggle").hasClass("ui-btn-up-d"),"Heading of third collapsible should have class ui-btn-up-d");
155
+
ok(collapsibles.eq(2).find(".ui-collapsible-content").hasClass("ui-btn-up-d"),"Content of third collapsible should have class ui-btn-up-d");
156
+
ok(!collapsibles.eq(2).find(".ui-collapsible-content").hasClass("ui-collapsible-content-collapsed"),"Content of third collapsible should NOT have class ui-collapsible-content-collapsed");
157
+
ok(collapsibles.eq(3).find(".ui-collapsible-heading-toggle").hasClass("ui-btn-up-d"),"Heading of fourth collapsible should have class ui-btn-up-d");
158
+
ok(collapsibles.eq(3).find(".ui-collapsible-content").hasClass("ui-btn-up-d"),"Content of fourth collapsible should have class ui-btn-up-d");
0 commit comments