From ecff441516f2574e66029a643de248b788f0ab07 Mon Sep 17 00:00:00 2001 From: L-Sun Date: Wed, 5 Jun 2024 06:08:21 +0000 Subject: [PATCH] chore(core): add padding when ai-panel is opened in page mode (#7151) Close BS-394 Related PR: https://github.com/toeverything/blocksuite/pull/7211 --- .../blocksuite/block-suite-editor/styles.css.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/styles.css.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/styles.css.ts index 7113273f81..0ce916d5f9 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/styles.css.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/styles.css.ts @@ -1,5 +1,6 @@ import { cssVar } from '@toeverything/theme'; -import { style } from '@vanilla-extract/css'; +import { style, type StyleRule } from '@vanilla-extract/css'; + export const docEditorRoot = style({ display: 'block', background: cssVar('backgroundPrimaryColor'), @@ -9,6 +10,14 @@ export const affineDocViewport = style({ display: 'flex', flexDirection: 'column', paddingBottom: '100px', + selectors: ['generating', 'finished', 'error'].reduce< + NonNullable + >((rules, state) => { + rules[`&:has(affine-ai-panel-widget[data-state='${state}'])`] = { + paddingBottom: '980px', + }; + return rules; + }, {}), }); export const docContainer = style({