mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
891d9df0b1
Close [BS-2392](https://linear.app/affine-design/issue/BS-2392/page-block-需要显示文章title) ### What Changes - Add `<doc-title>` to edgeless page block (a.k.a the first page visible note block) - Refactors: - Move `<doc-title>` to `@blocksuite/affine-component`, but you can aslo import it from `@blocksuite/preset` - Extract `<edgeless-note-mask>` and `<edgeless-note-background>` from `<affine-edgeless-note>` to a seperate file - Rewrite styles of `<affine-edgeless-note>` with `@vanilla-extract/css` https://github.com/user-attachments/assets/a0c03239-803e-4bfa-b30e-33b919213b12
28 lines
762 B
TypeScript
28 lines
762 B
TypeScript
import { cssVar } from '@toeverything/theme';
|
|
import { style } from '@vanilla-extract/css';
|
|
|
|
import {
|
|
ACTIVE_NOTE_EXTRA_PADDING,
|
|
edgelessNoteContainer,
|
|
} from '../note-edgeless-block.css';
|
|
|
|
export const background = style({
|
|
position: 'absolute',
|
|
borderColor: cssVar('black10'),
|
|
left: 0,
|
|
top: 0,
|
|
width: '100%',
|
|
height: '100%',
|
|
|
|
selectors: {
|
|
[`${edgelessNoteContainer}[data-editing="true"] &`]: {
|
|
left: `${-ACTIVE_NOTE_EXTRA_PADDING}px`,
|
|
top: `${-ACTIVE_NOTE_EXTRA_PADDING}px`,
|
|
width: `calc(100% + ${ACTIVE_NOTE_EXTRA_PADDING * 2}px)`,
|
|
height: `calc(100% + ${ACTIVE_NOTE_EXTRA_PADDING * 2}px)`,
|
|
transition: 'left 0.3s, top 0.3s, width 0.3s, height 0.3s',
|
|
boxShadow: cssVar('activeShadow'),
|
|
},
|
|
},
|
|
});
|