@@ -8,6 +8,7 @@ import ActionsExample from "@components/examples/collapsible/ActionsExample.astr
8
8
import DecorationsExample from " @components/examples/collapsible/DecorationsExample.astro" ;
9
9
import ScrollableExample from " @components/examples/collapsible/ScrollableExample.astro" ;
10
10
import ToggleExample from " @components/examples/collapsible/ToggleExample.astro" ;
11
+ import CssBodyPartExample from " @components/examples/collapsible/CssBodyPartExample.astro" ;
11
12
import Imports from " @components/examples/collapsible/Imports.astro" ;
12
13
13
14
<Imports />
@@ -160,6 +161,43 @@ Elements in the `decorations` slot are always visible, in contrast to the `actio
160
161
</Fragment >
161
162
</Demo >
162
163
164
+ ## Overflown content
165
+
166
+ The overflown content of the Collapsible component is hidden by default. Sometimes, this behavior
167
+ can be problematic. In such cases, it is useful that the Collapsible body is customizable.
168
+
169
+ <Demo >
170
+ <CssBodyPartExample />
171
+ <Fragment slot = " html" >
172
+ ``` html
173
+ <vscode-collapsible title =" Customized CSS part example" class =" css-part-example" open >
174
+ <p >Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p >
175
+ <vscode-single-select >
176
+ <vscode-option >Lorem</vscode-option >
177
+ <vscode-option >Ipsum</vscode-option >
178
+ <vscode-option >Dolor</vscode-option >
179
+ <vscode-option >Sit</vscode-option >
180
+ <vscode-option >Et</vscode-option >
181
+ <vscode-option >Amur</vscode-option >
182
+ <vscode-option >Sadispcing</vscode-option >
183
+ </vscode-single-select >
184
+ <p >Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p >
185
+ </vscode-collapsible >
186
+ ```
187
+ </Fragment >
188
+ <Fragment slot = " css" >
189
+ ``` css
190
+ .css-part-example ::part(body ) {
191
+ overflow : visible ;
192
+ }
193
+
194
+ .css-part-example p :last-child {
195
+ margin-bottom : 0 ;
196
+ }
197
+ ```
198
+ </Fragment >
199
+ </Demo >
200
+
163
201
## Displaying large amounts of data
164
202
165
203
Long content can be managed by the [ Scrollable] ( /components/scrollable ) component.
0 commit comments