diff --git a/docs/content/content-collapsible-set.html b/docs/content/content-collapsible-set.html index c0c5da6c..c562f6bb 100644 --- a/docs/content/content-collapsible-set.html +++ b/docs/content/content-collapsible-set.html @@ -28,19 +28,19 @@

By default, all the sections will be collapsed. To set a section to be open when the page loads, add the data-collapsed="false" attribute to the heading of the section you want expanded.

		
-<div data-role="collapsible-set">
+<div data-role="collapsible-set">
 
-	<div data-role="collapsible" data-collapsed="false">
-	<h3>Section A</h3>
+	<div data-role="collapsible" data-collapsed="false">
+	<h3>Section 1</h3>
 	<p>I'm the collapsible set content for section B.</p>
 	</div>
 	
 	<div data-role="collapsible">
-	<h3>Section B</h3>
+	<h3>Section 2</h3>
 	<p>I'm the collapsible set content for section B.</p>
 	</div>
 	
-</div>
+</div>
 	
@@ -48,47 +48,73 @@
-

Section A

-

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.

+

Section 1

+

I'm the collapsible content in a set so this feels like an accordion. I'm open by default because I have the data-collapsed="false" attribute.

-

Section B

+

Section 2

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.

-

Section C

+

Section 3

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.

-

Section D

+

Section 4

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.

-

Section E

+

Section 5

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.

-

Here is an example of a collapsible with 3 sections and data-content-theme set

+

Theming collapsible content

+

The standard data-theme attribute can be used to set the color of each collapsible in a set. To provide a clearer visual grouping of the content with the headers, add the data-content-theme attribute with a swatch letter. This adds a themed background color and border to the content block. For consistent theming, add these attributes to the parent collapsible set.

+ + +
		
+<div data-role="collapsible-set" data-theme="c" data-content-theme="d">
+
+ + +
+
+

Section 1

+

Collapsible content

+
+
+

Section 2

+

Collapsible content

+ +
+
+

Section 3

+

Collapsible content

+
+
+ + +

Theming individual sections

+

To have individual sections in a group styled differently, add data-theme and data-content-theme attributes to specific collapsibles.

-
-

Section F

-

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.

-
-
-

Section G

-

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.

+
+

Section header, swatch B

+

Collapsible content, swatch B

-
-

Section H

-

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.

- +
+

Section header, swatch A

+

Collapsible content, swatch A

+
+
+

Section header, swatch E

+

Collapsible content, swatch D

diff --git a/docs/content/content-collapsible.html b/docs/content/content-collapsible.html index 0509315b..437afdb3 100755 --- a/docs/content/content-collapsible.html +++ b/docs/content/content-collapsible.html @@ -31,13 +31,14 @@

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.

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.

- -
		
-	<div data-role="collapsible">
-	<h3>I'm a header</h3>
-	<p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
-	</div>
-	
+ +

By default, the content will be collapsed.

+
		
+<div data-role="collapsible">
+   <h3>I'm a header</h3>
+   <p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
+</div>
+
@@ -45,8 +46,9 @@

I'm the collapsible content. By default I'm closed, but you can click the header to open me.

- -

As the example notes, by default the content will be collapsed. To expand the content when the page loads, add the data-collapsed="false" attribute to the wrapper.

+

Expanding collapsibles on load

+ +

To expand the content when the page loads, add the data-collapsed="false" attribute to the wrapper.

<div data-role="collapsible" data-collapsed="false"> @@ -60,71 +62,103 @@

I'm the collapsible content. I'm expanded by default because I have the "collapsed" state set to false.

-

Collapsible content is minimally styled — we add only a bit of margin between the bar and content, and the header adopts the default Theme styles of the container it sits within.

- -

Collapsible example

-

This page has 5 collapsible containers with different types of content inside.

- -
-

Section 1: Collapsed text block

-

I'm closed when the page loads because that's the default state of a collapsible.

-

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.

-
- -
-

Section 2: Expanded on load

-

I'm opened when the page loads because I have the data-collapsed="false" attribute on my container.

-

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.

-
- -
-

Section 3: Form elements

-
-
- - -
-
- - -
-
-
-
-
-
-
+

Theming collapsible content

-
-

Section 4: Collapsed list

- -
- -
-

Section 5: themed content

-

I have data-content-theme attribute set manually on my container to set the color to match the content block I'm in.

-
-

Nested Collapsibles

-
-

I'm a header

-

I'm the collapsible content. By default I'm open and displayed on the page, but you can click the header to hide me.

-
-

I'm a nested collapsible header

-

I'm the collapsible content in a nested collapsible. By default I'm open and displayed on the page, but you can click the header to hide me.

-
+

Collapsible content is minimally styled — we add only a bit of margin between the bar and content, and the header adopts the default Theme styles of the container it sits within.

+ +

To provide a stronger visual connection between the collapsible header and content, add the data-content-theme attribute to the wrapper and specify a theme swatch letter. This will apply the swatch's border and flat background color (not the gradient) to the content block and changes the corner rounding to square off the bottom of the header and round the bottom of the content block instead to visually group these elements.

+ +
		
+<div data-role="collapsible" data-content-theme="c">
+   <h3>Header swatch A</h3>
+   <p>I'm the collapsible content with a themed content block set to "C".</p>
+</div>
+
+ +
+

Header swatch

+

I'm the collapsible content with a themed content block set to "C".

-

Collapsible sets

+

Theming collapsible headers

+

To set the theme on a collapsible header button, add the data-theme attribute to the wrapper and specify a swatch letter. Note that you can mix and match swatch letters between the header and content with these theme attributes.

+ +
		
+<div data-role="collapsible" data-theme="a" data-content-theme="a">
+   <h3>Header swatch A</h3>
+   <p>I'm the collapsible content with a themed content block set to "A".</p>
+</div>
+
+ +
+

Header swatch A

+

I'm the collapsible content with a themed content block set to "A".

+
+ + + +
+

Header swatch B

+

I'm the collapsible content with a themed content block set to "D".

+
+ + + +

Nested Collapsibles

+ +

Collapsibles can be nested inside each other if needed. In this example, we're setting the content theme to provide clearer visual connection between the levels.

+
+

I'm a header

+

I'm the collapsible content. By default I'm open and displayed on the page, but you can click the header to hide me.

+ +
+

I'm a nested collapsible with a child collapsible

+

I'm a child collapsible.

+
+

Nested inside again.

+

Three levels deep now.

+
+
+ + +
+

Section 3: Form elements

+
+
+ + +
+
+ + +
+
+
+
+
+
+
+ +
+

Section 4: Collapsed list

+

Here is an inset list:

+ +
+
+ + + +

Collapsible sets (accordions)

It's possible to combine multiple collapsibles into a grouped sets that acts like an accordion widget. Learn more

@@ -141,13 +175,13 @@
  • Content Formatting
  • Basic HTML styles
  • Layout grids (columns)
  • -
  • Collapsible content blocks
  • -
  • Collapsible sets (accordions)
  • +
  • Collapsible content blocks
  • +
  • Collapsible sets (accordions)
  • Theming content
  • -
    +