Et2Dialog: Better non-modal styling

This commit is contained in:
nathan 2022-12-07 11:30:14 -07:00
parent eb9ccfc655
commit 32248e67ee
2 changed files with 15 additions and 4 deletions

View File

@ -222,6 +222,15 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
border-top: 1px solid silver;
margin-top: 0.5em;
}
/* Non-modal dialogs don't have an overlay */
:host(:not([modal])) .dialog, :host(:not([modal])) .dialog__overlay {
pointer-events: none;
background: transparent;
}
:host(:not([modal])) .dialog__panel {
pointer-events: auto;
}
`
];
}
@ -990,6 +999,12 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
listeners: {
move: this._onMoveResize
},
modifiers: (this.modal ? [] : [
interact.modifiers.restrict({
restriction: 'parent',
endOnly: true
})
])
});
}

View File

@ -788,10 +788,6 @@ et2-dialog .dialog--has_message {
display: flex;
}
/* Non-modal dialogs don't cover application tabs (add them to the app content div), not body */
et2-dialog:not([modal])::part(base), et2-dialog:not([modal])::part(overlay) {
inset: 50px 0 0 0;
}
/**