-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccordionBlock: use height transition instead of css only solution #416
base: main
Are you sure you want to change the base?
Conversation
4a8c2f8
to
aa02c0d
Compare
👎 for a non-css-only solution in starter |
IMO a toggle between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for a decision here: #416 (comment)
I somewhat agree, but I don't know of another reliable way of achieving this. |
…sableLastBottomSpacing to RTE inside accordion
Setting the inline height has so many disadvantages (and bugs) - we really must give our best to avoid that. See here for possible solutions: The max-height idea seems pretty clever. |
@nsams can you explain this? I do not know these.
The max-height solution has other problems (trade offs). The transition is always towards the max-height (smaller heights are not animated properly). What do we set for max-height - any content can be inserted into the accordion item? I am no css expert, when @mariokemetinger, @jamesricky or @johnnyomair have any other, more solid, solution feel free to talk to me :) |
if the content changes it's height (other than window resize) the inline height won't be updated |
right. The stackoverflow question has 46 answers, maybe some other is working for us. |
Animating height using the |
@nsams correct me if i'm wrong, but i think there is no such case in the starter, where the content can change it's height. I think for now, this solution is working for us/the starter, better than the current one. (also most used in our projects). |
This is the starter, that starts anything you can't imagine. That's why I say it's an Okish solution for an project where you can argue that no content can change it's height. But not for starter. Have you looked at the other 45 answers? An alternative solution might be to unset the inline style after the animation completed. I don't know how easy that is nowadays. |
We need to evaluate if we can find a CSS-only solution.
Description
Because the css solution with
margin-top: -100%;
could potentially made some problems we fall back to the default ref height transition animation.