minor dropdown improvements

This commit is contained in:
Aran-Fey
2024-06-23 01:54:05 +02:00
parent c3c8891a83
commit 6e85ca4002
4 changed files with 73 additions and 59 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ export abstract class ComponentBase {
this.innerAlignElement!.classList.add('stretch-child-x');
} else {
this.innerAlignElement!.style.left = `${align[0] * 100}%`;
this.innerAlignElement!.style.width = 'min-content';
this.innerAlignElement!.style.width = 'max-content';
this.innerAlignElement!.classList.remove('stretch-child-x');
transform += `translateX(-${align[0] * 100}%) `;
}
@@ -170,7 +170,7 @@ export abstract class ComponentBase {
this.innerAlignElement!.classList.add('stretch-child-y');
} else {
this.innerAlignElement!.style.top = `${align[1] * 100}%`;
this.innerAlignElement!.style.height = 'min-content';
this.innerAlignElement!.style.height = 'max-content';
this.innerAlignElement!.classList.remove('stretch-child-y');
transform += `translateY(-${align[1] * 100}%) `;
}