mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(editor): unify directories naming (#11516)
**Directory Structure Changes** - Renamed multiple block-related directories by removing the "block-" prefix: - `block-attachment` → `attachment` - `block-bookmark` → `bookmark` - `block-callout` → `callout` - `block-code` → `code` - `block-data-view` → `data-view` - `block-database` → `database` - `block-divider` → `divider` - `block-edgeless-text` → `edgeless-text` - `block-embed` → `embed`
This commit is contained in:
52
blocksuite/affine/blocks/code/src/styles.ts
Normal file
52
blocksuite/affine/blocks/code/src/styles.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { scrollbarStyle } from '@blocksuite/affine-shared/styles';
|
||||
import { css } from 'lit';
|
||||
|
||||
export const codeBlockStyles = css`
|
||||
.affine-code-block-container {
|
||||
font-size: var(--affine-font-xs);
|
||||
line-height: var(--affine-line-height);
|
||||
position: relative;
|
||||
padding: 28px 24px;
|
||||
background: var(--affine-background-code-block);
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.affine-code-block-container.mobile {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
${scrollbarStyle('.affine-code-block-container rich-text')}
|
||||
|
||||
.affine-code-block-container .inline-editor {
|
||||
font-family: var(--affine-font-code-family);
|
||||
font-variant-ligatures: none;
|
||||
}
|
||||
|
||||
.affine-code-block-container v-line {
|
||||
position: relative;
|
||||
display: inline-grid !important;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.affine-code-block-container div:has(> v-line) {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.affine-code-block-container .line-number {
|
||||
position: sticky;
|
||||
text-align: left;
|
||||
padding-right: 4px;
|
||||
width: 24px;
|
||||
word-break: break-word;
|
||||
white-space: nowrap;
|
||||
left: -0.5px;
|
||||
z-index: 1;
|
||||
background: var(--affine-background-code-block);
|
||||
font-size: var(--affine-font-xs);
|
||||
line-height: var(--affine-line-height);
|
||||
color: var(--affine-text-secondary);
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user