Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

[ Height transition ] it's un useful by max-height (question) #92

Closed
maxxiaobao opened this issue May 7, 2018 · 4 comments
Closed

Comments

@maxxiaobao
Copy link

On the example https://codepen.io/anon/pen/jxaWQw, use JavaScript to control the max-height,
I try to use css to finish like below

.el {
  transition: max-height 0.5s;
  overflow: hidden;
  max-height: 0;
}
.trigger:hover > .el {
  max-height: 100%;
}

The result is: when you hover the trigger, the content will showing, but no transition.
This makes me confused, could you tell me the reason when you have time, thanks a lot!

@maxxiaobao maxxiaobao changed the title [ Height transition ] it's un useful by max-height ( question ) [ Height transition ] it's un useful by max-height ( question ) May 7, 2018
@maxxiaobao maxxiaobao changed the title [ Height transition ] it's un useful by max-height ( question ) [ Height transition ] it's un useful by max-height [proposed Label] actual title May 7, 2018
@maxxiaobao maxxiaobao changed the title [ Height transition ] it's un useful by max-height [proposed Label] actual title [ Height transition ] it's un useful by max-height (question) May 7, 2018
@atomiks
Copy link
Contributor

atomiks commented May 7, 2018

The max-height property needs to be set as the variable:

.trigger:hover > .el {
  max-height: var(--max-height);
}

@fejes713
Copy link
Contributor

fejes713 commented May 9, 2018

This message doesn't belong here - but hey @atomiks could you check your Gitter DMs. We need your assistance. Thanks 😄

@maxxiaobao
Copy link
Author

thanks

@lock
Copy link

lock bot commented Dec 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants