Closed Temzasse closed 2 years ago
By adding a nested accordion within another accordion the height is not animated correctly and the nested accordion is clipped by the content element.
In this demo the height animations work as expected, however it is much older version of the accordion component.
CodeSandbox
Maybe the --radix-accordion-content-height CSS variable can be kept in sync with the content height by using ResizeObserver?
--radix-accordion-content-height
Hey @Temzasse , this was fixed in https://github.com/radix-ui/primitives/pull/1344, if you use the latest RC and remove forwards from the animation they should work as expected:
forwards
https://codesandbox.io/s/cool-brook-m7sznz
Bug report
Current Behavior
By adding a nested accordion within another accordion the height is not animated correctly and the nested accordion is clipped by the content element.
Expected behavior
In this demo the height animations work as expected, however it is much older version of the accordion component.
Reproducible example
CodeSandbox
Suggested solution
Maybe the
--radix-accordion-content-height
CSS variable can be kept in sync with the content height by using ResizeObserver?Additional context
Your environment