mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
#### PR Dependency Tree * **PR #12980** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
74 lines
1.8 KiB
TypeScript
74 lines
1.8 KiB
TypeScript
import { scrollbarStyle } from '@blocksuite/affine-shared/styles';
|
|
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
|
import { css } from 'lit';
|
|
|
|
export const codeBlockStyles = css`
|
|
affine-code {
|
|
display: block;
|
|
}
|
|
|
|
.affine-code-block-container {
|
|
font-size: var(--affine-font-xs);
|
|
line-height: var(--affine-line-height);
|
|
position: relative;
|
|
padding: 32px 20px;
|
|
background: var(--affine-background-code-block);
|
|
border-radius: 10px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.affine-code-block-container.mobile {
|
|
padding: 12px;
|
|
}
|
|
|
|
.affine-code-block-container.highlight-comment {
|
|
outline: 2px solid ${unsafeCSSVarV2('block/comment/highlightUnderline')};
|
|
}
|
|
|
|
${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.disable-line-numbers v-line {
|
|
grid-template-columns: unset;
|
|
}
|
|
|
|
.affine-code-block-container div:has(> v-line) {
|
|
display: grid;
|
|
}
|
|
|
|
.affine-code-block-container .line-number {
|
|
position: sticky;
|
|
text-align: left;
|
|
padding-right: 12px;
|
|
width: 32px;
|
|
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;
|
|
}
|
|
|
|
.affine-code-block-container.disable-line-numbers .line-number {
|
|
display: none;
|
|
}
|
|
|
|
affine-code .affine-code-block-preview {
|
|
padding: 12px;
|
|
}
|
|
`;
|