fix(Artboard): update dimensions to use CSS variables for better layout control (#9277)

This commit is contained in:
Gophlet 2025-08-18 18:18:44 +08:00 committed by GitHub
parent 9a4200ac1a
commit f3884af4b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,8 +50,8 @@ const Artboard: FC<ArtboardProps> = ({
src={getCurrentImageUrl()}
preview={{ mask: false }}
style={{
maxWidth: '70vh',
maxHeight: '70vh',
maxWidth: 'var(--artboard-max)',
maxHeight: 'var(--artboard-max)',
objectFit: 'contain',
backgroundColor: 'var(--color-background-soft)',
cursor: 'pointer'
@ -109,12 +109,14 @@ const Container = styled.div`
flex-direction: row;
justify-content: center;
align-items: center;
--artboard-max: calc(100vh - 256px);
`
const ImagePlaceholder = styled.div`
display: flex;
width: 70vh;
height: 70vh;
width: var(--artboard-max);
height: var(--artboard-max);
background-color: var(--color-background-soft);
align-items: center;
justify-content: center;