mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-22 00:37:05 +08:00
chore(core): use flexbox to stretch editor height (#9174)
This commit is contained in:
@@ -281,7 +281,7 @@ export const BlocksuiteDocEditor = forwardRef<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.affineDocViewport} style={{ height: '100%' }}>
|
<div className={styles.affineDocViewport}>
|
||||||
{!isJournal ? (
|
{!isJournal ? (
|
||||||
<adapted.DocTitle doc={page} ref={onTitleRef} />
|
<adapted.DocTitle doc={page} ref={onTitleRef} />
|
||||||
) : (
|
) : (
|
||||||
@@ -351,9 +351,9 @@ export const BlocksuiteEdgelessEditor = forwardRef<
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className={styles.affineEdgelessDocViewport}>
|
||||||
<adapted.EdgelessEditor ref={onDocRef} doc={page} specs={specs} />
|
<adapted.EdgelessEditor ref={onDocRef} doc={page} specs={specs} />
|
||||||
{portals}
|
{portals}
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,15 +2,22 @@ import { cssVar } from '@toeverything/theme';
|
|||||||
import { style, type StyleRule } from '@vanilla-extract/css';
|
import { style, type StyleRule } from '@vanilla-extract/css';
|
||||||
|
|
||||||
export const docEditorRoot = style({
|
export const docEditorRoot = style({
|
||||||
display: 'block',
|
|
||||||
overflowX: 'clip',
|
overflowX: 'clip',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
});
|
});
|
||||||
|
|
||||||
export const affineDocViewport = style({
|
export const affineDocViewport = style({
|
||||||
|
height: '100%',
|
||||||
|
flex: 1,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
paddingBottom: '100px',
|
paddingBottom: '100px',
|
||||||
});
|
});
|
||||||
|
export const affineEdgelessDocViewport = style({
|
||||||
|
height: '100%',
|
||||||
|
flex: 1,
|
||||||
|
});
|
||||||
|
|
||||||
export const docContainer = style({
|
export const docContainer = style({
|
||||||
display: 'block',
|
display: 'block',
|
||||||
|
|||||||
Reference in New Issue
Block a user