Skip to content

Expand childElement with its content #3

Description

@MikeDabrowski

I am using this transitions to switch pages with text. Text will be generated so it will have various height. Overflow is set to hidden so if my text page is longer it just disappears. I'd like to allow expanding to match content height. I must admit I modified this react-transitions slightly but my mods are not causing this issue.
The biggest problem is position absolute. Element with such position acts differently in webpage flow. Also disabling it causes animations to act weird: mid transition two pages with text are visible which looks bad.

tParent and tChild are custom names for classes generated by react-transitions

My current html part:

<div class="overParent">
<div class="tParent">
<div class="tChild">
<div class="Page"></div></div></div></div>

Relevant css:

.overParent{
	width: 600px;
	margin: 0 auto;
	height: auto;
	clear: both;

}
.tParent{
	perspective: 1200px;
	position: relative;
	overflow: hidden;
	min-height: 580px;
	width: 600px;
	margin: 0 auto;
	left:0;
	top: 0;
	right: 0;
	float:left;
}
.tChild{
	position: absolute;
	display: inline-block;
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transformStyle: preserve-3d;
	backfaceVisibility: hidden;
	height: auto;
	left:0;
	top: 0;
	right:0;
	float: left;
}
.Page{
	width: 600px;
	padding: 0px;
}

I need that because I want to add footer below this transition.
Here is the link to my latest efforts on setting it up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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