|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> |
3 | 2 | <!-- |
4 | 3 | Within the sample documentation, where necessary, the texts describing the usage of each component have been copied |
5 | 4 | directly from the official Bootstrap 5.3 documentation (found at https://getbootstrap.com/docs/5.3), however DITA |
|
8 | 7 | This work is a derivative of "Bootstrap 5.3 docs" by Twitter, Inc. and the Bootstrap Authors, |
9 | 8 | and used under CC BY 3.0. See the accompanying LICENSE file for applicable licenses. |
10 | 9 | --> |
| 10 | +<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> |
11 | 11 | <topic id="accordion"> |
12 | 12 | <title>Accordion</title> |
13 | 13 | <shortdesc>Build vertically collapsing accordions in combination with Bootstrap’s Collapse JavaScript |
|
20 | 20 | <indexterm><xmlatt>outputclass</xmlatt></indexterm> |
21 | 21 | </indexterm> |
22 | 22 | <indexterm><xmlelement>bodydiv</xmlelement></indexterm> |
| 23 | + <indexterm><xmlelement>accordion</xmlelement></indexterm> |
| 24 | + <indexterm><xmlelement>accordion-item</xmlelement></indexterm> |
23 | 25 | </keywords> |
24 | 26 | </metadata> |
25 | 27 | </prolog> |
|
32 | 34 | format="html" |
33 | 35 | scope="external" |
34 | 36 | >collapse</xref> internally to make it collapsible. To render an accordion that’s expanded, add |
35 | | - <xmlatt>outputclass="show"</xmlatt> to expand the relevant <xmlelement>section</xmlelement> .</p> |
| 37 | + <xmlatt>open="yes"</xmlatt> to expand the relevant <xmlelement>accordion-item</xmlelement> .</p> |
36 | 38 | </section> |
37 | 39 | <section> |
38 | 40 | <title>Example</title> |
39 | 41 | <p>Click the accordions below to expand/collapse the accordion content.</p> |
40 | 42 | </section> |
41 | | - <bodydiv outputclass="bd-example" deliveryTarget="html"> |
| 43 | + <bodydiv outputclass="p-3 border"> |
42 | 44 | <bodydiv outputclass="accordion"> |
43 | 45 | <section id="accordion1" outputclass="show"> |
44 | 46 | <title>Accordion Item #1</title> |
|
66 | 68 | </section> |
67 | 69 | </bodydiv> |
68 | 70 | </bodydiv> |
69 | | - <codeblock><bodydiv outputclass="accordion"> |
| 71 | + <bodydiv outputclass="nav-pills mt-3"> |
| 72 | + <section> |
| 73 | + <title><xmlatt>outputclass</xmlatt></title> |
| 74 | + <codeblock><bodydiv outputclass="accordion"> |
70 | 75 | <section id="accordion1" outputclass="show"> |
71 | 76 | <title>Accordion Item #1</title> |
72 | 77 | <p> |
|
98 | 103 | </p> |
99 | 104 | </section> |
100 | 105 | </bodydiv></codeblock> |
| 106 | + </section> |
| 107 | + <section> |
| 108 | + <title>Specialization</title> |
| 109 | + <codeblock><accordion> |
| 110 | + <accordion-item id="accordion1" open="yes"> |
| 111 | + <title>Accordion Item #1</title> |
| 112 | + <p> |
| 113 | + <b>This is the first item’s accordion body.</b> It is shown by default, |
| 114 | + until the collapse plugin adds the appropriate classes that we use to style each element. |
| 115 | + These classes control the overall appearance, as well as the showing and hiding via CSS |
| 116 | + transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default |
| 117 | + variables. |
| 118 | + </p> |
| 119 | + </accordion-item> |
| 120 | + <accordion-item id="accordion2"> |
| 121 | + <title>Accordion Item #2</title> |
| 122 | + <p> |
| 123 | + <b>This is the second item’s accordion body.</b> It is hidden by default, |
| 124 | + until the collapse plugin adds the appropriate classes that we use to style each element. |
| 125 | + These classes control the overall appearance, as well as the showing and hiding via CSS |
| 126 | + transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default |
| 127 | + variables. |
| 128 | + </p> |
| 129 | + </accordion-item> |
| 130 | + <accordion-item id="accordion3"> |
| 131 | + <title>Accordion Item #3</title> |
| 132 | + <p> |
| 133 | + <b>This is the third item’s accordion body.</b> It is hidden by default, |
| 134 | + until the collapse plugin adds the appropriate classes that we use to style each element. |
| 135 | + These classes control the overall appearance, as well as the showing and hiding via CSS |
| 136 | + transitions. You can modify any of this with custom CSS or overriding Bootstrap’s default |
| 137 | + variables. |
| 138 | + </p> |
| 139 | + </accordion-item> |
| 140 | +</accordion></codeblock> |
| 141 | + </section> |
| 142 | + </bodydiv> |
101 | 143 | <section> |
102 | 144 | <title>Flush</title> |
103 | | - <p>Add <xmlatt>outputclass="accordion-flush"</xmlatt> to remove the default |
| 145 | + <p>Set <xmlatt>flush="yes"</xmlatt> to remove the default |
104 | 146 | background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent |
105 | 147 | container.</p> |
106 | 148 | </section> |
107 | | - <bodydiv outputclass="bd-example" deliveryTarget="html"> |
| 149 | + <bodydiv outputclass="p-3 border"> |
108 | 150 | <bodydiv outputclass="accordion-flush"> |
109 | 151 | <section id="accordion4"> |
110 | 152 | <title>Accordion Item #1</title> |
111 | 153 | <p> |
112 | | - Placeholder content for this accordion, which is intended to demonstrate <xmlatt |
113 | | - >outputclass="accordion-flush"</xmlatt>. |
| 154 | + Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt> |
114 | 155 | This is the first item's accordion body.</p> |
115 | 156 | </section> |
116 | 157 | <section id="accordion5"> |
117 | 158 | <title>Accordion Item #2</title> |
118 | | - <p>Placeholder content for this accordion, which is intended to demonstrate <xmlatt |
119 | | - >outputclass="accordion-flush"</xmlatt>. |
| 159 | + <p>Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt> |
120 | 160 | This is the second item's accordion body. Let's imagine this being filled with some actual content.</p> |
121 | 161 | </section> |
122 | 162 | <section id="accordion6"> |
123 | 163 | <title>Accordion Item #3</title> |
124 | 164 | <p> |
125 | | - Placeholder content for this accordion, which is intended to demonstrate <xmlatt |
126 | | - >outputclass="accordion-flush"</xmlatt>. |
| 165 | + Placeholder content for this accordion, which is intended to demonstrate the use of <xmlatt>flush</xmlatt> |
127 | 166 | This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space |
128 | 167 | to make it look, at least at first glance, a bit more representative of how this would look in a real-world application.</p> |
129 | 168 | </section> |
130 | 169 | </bodydiv> |
131 | 170 | </bodydiv> |
132 | | - <codeblock><bodydiv outputclass="accordion-flush"> |
| 171 | + <bodydiv outputclass="nav-pills mt-3"> |
| 172 | + <section> |
| 173 | + <title><xmlatt>outputclass</xmlatt></title> |
| 174 | + <codeblock><bodydiv outputclass="accordion-flush"> |
133 | 175 | ...etc |
134 | | -<bodydiv></codeblock> |
| 176 | +</bodydiv></codeblock> |
| 177 | + </section> |
| 178 | + <section> |
| 179 | + <title>Specialization</title> |
| 180 | + <codeblock><accordion flush="yes"> |
| 181 | + ...etc |
| 182 | +</accordion></codeblock> |
| 183 | + </section> |
| 184 | + </bodydiv> |
135 | 185 |
|
136 | 186 | <section> |
137 | 187 | <title>Always open</title> |
138 | | - <p>Set <xmlelement |
139 | | - >bodydiv outputclass="accordion-open"</xmlelement> to make accordion items stay open when another item is opened.</p> |
| 188 | + <p>Set <xmlatt>open="yes"</xmlatt> to make accordion items stay open when another item is opened.</p> |
140 | 189 | </section> |
141 | | - <bodydiv outputclass="bd-example" deliveryTarget="html"> |
| 190 | + <bodydiv outputclass="p-3 border"> |
142 | 191 | <bodydiv outputclass="accordion-open"> |
143 | 192 | <section id="accordion7" outputclass="show"> |
144 | 193 | <title>Accordion Item #1</title> |
|
166 | 215 | </section> |
167 | 216 | </bodydiv> |
168 | 217 | </bodydiv> |
169 | | - <codeblock><bodydiv outputclass="accordion-open"> |
| 218 | + <bodydiv outputclass="nav-pills mt-3"> |
| 219 | + <section> |
| 220 | + <title><xmlatt>outputclass</xmlatt></title> |
| 221 | + <codeblock><bodydiv outputclass="accordion-open"> |
170 | 222 | ...etc |
171 | | -<bodydiv></codeblock> |
| 223 | +</bodydiv></codeblock> |
| 224 | + </section> |
| 225 | + <section> |
| 226 | + <title>Specialization</title> |
| 227 | + <codeblock><accordion open="yes"> |
| 228 | + ...etc |
| 229 | +</accordion></codeblock> |
| 230 | + </section> |
| 231 | + </bodydiv> |
172 | 232 | </body> |
173 | 233 | </topic> |
0 commit comments