You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Collapsible Content height is zero (empty content), --radix-collapsible-content-height isn't added to CSS variables.
This is problematic because in CSS, variables are inherited from parents.
In a nested structure of collapsible, this causes animation that depends on --radix-collapsible-content-height to use the value from parent, which is an incorrect value.
Directory.animation.bug.mov
For example, math item is a collapsible with zero height, it inherits the variable --radix-collapsible-content-height from parent, because it is missing on the math item itself.
Expected behavior
--radix-collapsible-content-height should be defined on the content node (--radix-collapsible-content-height: 0 in element styles)
Bug report
Current Behavior
When the Collapsible Content height is zero (empty content),
--radix-collapsible-content-height
isn't added to CSS variables.This is problematic because in CSS, variables are inherited from parents.
In a nested structure of collapsible, this causes animation that depends on
--radix-collapsible-content-height
to use the value from parent, which is an incorrect value.Directory.animation.bug.mov
For example,
math
item is a collapsible with zero height, it inherits the variable--radix-collapsible-content-height
from parent, because it is missing on themath
item itself.Expected behavior
--radix-collapsible-content-height
should be defined on the content node (--radix-collapsible-content-height: 0
in element styles)Reproducible example
https://codesandbox.io/p/sandbox/lucid-rain-wr283c
The nested item with empty content doesn't have the variable defined.
Suggested solution
N/A
Additional context
N/A
Your environment
@radix-ui/react-collapsible
The text was updated successfully, but these errors were encountered: