Home › Forums › General Issues › Can I use a different transition when hiding/showing conditional fields? › Reply To: Can I use a different transition when hiding/showing conditional fields?
I think I found a way:
override the display: [ none | block ] with opacity: [ 0 | 1 ] + height: [ 0 | auto ]
.acf-field {
transition: all .5s ease-in 0s;
}
#acf-form .acf-field.acf-hidden {
display: block !important;
opacity: 0;
height: 0;
}
#acf-form .acf-field:not(.acf-hidden) {
opacity: 1;
height: auto;
}
_________
Inspired by this and this (as partial answers)
Note: I just figured this out, I’m not yet sure if there are any downsides to it.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.