Fix overflow hidden cutting off avatars on mobile
This commit is contained in:
parent
e0fbd06e10
commit
58da72d344
2 changed files with 16 additions and 4 deletions
|
|
@ -453,14 +453,15 @@ form.node-action {
|
|||
}
|
||||
|
||||
/* Node children collapse/expand animation */
|
||||
[id^="node-children-"] {
|
||||
[id^="node-children-"].toggle-collapsed {
|
||||
overflow: hidden;
|
||||
max-height: 10000px;
|
||||
max-height: 0;
|
||||
transition: max-height 0.8s ease-out;
|
||||
}
|
||||
|
||||
[id^="node-children-"].toggle-collapsed {
|
||||
max-height: 0;
|
||||
[id^="node-children-"].toggle-expanding {
|
||||
overflow: hidden;
|
||||
transition: max-height 0.8s ease-out;
|
||||
}
|
||||
|
||||
.my-namespaces-div {
|
||||
|
|
|
|||
|
|
@ -50,10 +50,21 @@ function toggle(target, button, off_text, on_text) {
|
|||
// Handle node-children collapse (visible by default, toggle to hide)
|
||||
if (target.indexOf('node-children-') === 0) {
|
||||
if (el.classList.contains('toggle-collapsed')) {
|
||||
// Expanding: set max-height to scrollHeight, animate, then remove classes
|
||||
el.classList.add('toggle-expanding');
|
||||
el.style.maxHeight = el.scrollHeight + 'px';
|
||||
el.classList.remove('toggle-collapsed');
|
||||
btn.textContent = on_text;
|
||||
setTimeout(function() {
|
||||
el.classList.remove('toggle-expanding');
|
||||
el.style.maxHeight = '';
|
||||
}, 800);
|
||||
} else {
|
||||
// Collapsing: set max-height to current height, then collapse
|
||||
el.style.maxHeight = el.scrollHeight + 'px';
|
||||
el.offsetHeight; // force reflow
|
||||
el.classList.add('toggle-collapsed');
|
||||
el.style.maxHeight = '';
|
||||
btn.textContent = off_text;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue