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 content of a collapsible has margins, the height is calculated without the margin, causing a janky transition.
This is due to collapsing margins:
6.2. Collapsing margins
Certain adjoining margins combine to form a single margin. Those margins are said to “collapse.” Margins are adjoining if there are no nonempty content, padding or border areas or clearance to separate them.
One way to fix this is by adding overflow: auto to the container, but i'm worried about unwanted scrollbars appearing in certain cases.
Another solution is adding padding: 1px to .content, to prevent the margins from collapsing.
We can then add margin: -1px to .content-wrapper to remove the 1px spacing.
The text was updated successfully, but these errors were encountered:
When the content of a collapsible has margins, the height is calculated without the margin, causing a janky transition.
This is due to collapsing margins:
One way to fix this is by adding
overflow: auto
to the container, but i'm worried about unwanted scrollbars appearing in certain cases.Another solution is adding
padding: 1px
to.content
, to prevent the margins from collapsing.We can then add
margin: -1px
to.content-wrapper
to remove the 1px spacing.The text was updated successfully, but these errors were encountered: