Skip to content

Inner Elements with margin not handled properly #52

@don-esteban

Description

@don-esteban

Hi frankwallis,

nice component. Thanks.

Suppose you slide down this child:

<div class="react-slidedown" style="height: auto; transition-property: none;">
<!-- The child -->
<p>no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor...</p>
</div>

If <p> has margins, you get a "hopp" at the end of the transition. Probably, the top margin of the first child and the bottom margin of the last child mess up with the height calculation.

I worked around with something like that:

p:first-child {
      margin-top : 0rem;
}
p:last-child {
       margin-bottom : 0rem;
}

Could this be fixed?

Thanks for sharing your code
Stefan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions