mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
fix(editor): clip content within menu (#10764)
Closes: [BS-2796](https://linear.app/affine-design/issue/BS-2796/menu-中内容被剪切的问题)
This commit is contained in:
@@ -98,28 +98,10 @@ export class EditorMenuButton extends WithDisposable(LitElement) {
|
|||||||
export class EditorMenuContent extends LitElement {
|
export class EditorMenuContent extends LitElement {
|
||||||
static override styles = css`
|
static override styles = css`
|
||||||
:host {
|
:host {
|
||||||
--packed-height: 6px;
|
|
||||||
--offset-height: calc(-1 * var(--packed-height));
|
|
||||||
display: none;
|
display: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
}
|
overflow-y: auto;
|
||||||
|
|
||||||
:host::before,
|
|
||||||
:host::after {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
height: var(--packed-height);
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host::before {
|
|
||||||
top: var(--offset-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
:host::after {
|
|
||||||
bottom: var(--offset-height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:host([data-show]) {
|
:host([data-show]) {
|
||||||
@@ -152,8 +134,7 @@ export class EditorMenuContent extends LitElement {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: unset;
|
gap: unset;
|
||||||
min-height: unset;
|
min-height: fit-content;
|
||||||
overflow-y: auto;
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user