rewrite DocsCollapsible
now with disabled js support and less broken animations
This commit is contained in:
parent
22b8e154f3
commit
45fc2eed5a
9 changed files with 136 additions and 46 deletions
17
src/styles/components/accordion.css
Normal file
17
src/styles/components/accordion.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
.accordion {
|
||||
& summary {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
& .accordion-container {
|
||||
/* fixes jumps due to margins on inline items */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
& .accordion-container.animate {
|
||||
/* this somehow breaks if both min AND max aren't animated */
|
||||
transition: min-height 0.3s ease, max-height 0.3s ease;
|
||||
min-height: var(--height);
|
||||
max-height: var(--height);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue