mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
74d5ebad13
### Summary of Changes Resolves #13340. Change align-items to stretch to full width to avoid tag/label from overlapping with equation. ### Screenshot Verification **Before** <img width="661" height="256" alt="Screenshot 2026-04-19 at 5 58 03 PM" src="https://github.com/user-attachments/assets/a99d0138-838f-4f91-bd63-cbd07710484c" /> **After** <img width="614" height="275" alt="Screenshot 2026-04-19 at 5 58 16 PM" src="https://github.com/user-attachments/assets/7e62ab09-f290-4b6e-9cd6-d20b8f990da3" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved the vertical alignment of LaTeX block content to better utilize container space. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
41 lines
931 B
TypeScript
41 lines
931 B
TypeScript
import { unsafeCSSVar, unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
|
import { css } from 'lit';
|
|
|
|
export const latexBlockStyles = css`
|
|
.latex-block-container {
|
|
display: flex;
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 10px 24px;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
justify-content: center;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
user-select: none;
|
|
}
|
|
|
|
.latex-block-container:hover {
|
|
background: ${unsafeCSSVar('hoverColor')};
|
|
}
|
|
|
|
.latex-block-error-placeholder {
|
|
color: ${unsafeCSSVarV2('text/highlight/fg/red')};
|
|
font-family: Inter;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
line-height: normal;
|
|
user-select: none;
|
|
}
|
|
|
|
.latex-block-empty-placeholder {
|
|
color: ${unsafeCSSVarV2('text/secondary')};
|
|
font-family: Inter;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
line-height: normal;
|
|
user-select: none;
|
|
}
|
|
`;
|