fix: some style updates (#2348)

This commit is contained in:
Peng Xiao
2023-05-15 12:58:13 +08:00
committed by GitHub
parent 7786456ba4
commit 183611a556
14 changed files with 76 additions and 90 deletions

View File

@@ -13,19 +13,17 @@ export const navWrapperStyle = style({
width: navWidthVar,
minWidth: navWidthVar,
height: '100%',
backgroundColor: 'var(--affine-background-secondary-color)',
zIndex: 2,
backgroundColor: 'transparent',
'@media': {
[`(max-width: ${floatingMaxWidth}px)`]: {
position: 'absolute',
width: `calc(${navWidthVar})`,
zIndex: 2,
backgroundColor: 'var(--affine-background-primary-color)',
selectors: {
'&[data-open="false"]': {
marginLeft: `calc((10vw + ${navWidthVar}) * -1)`,
},
'&[data-is-macos-electron="true"]': {
backgroundColor: 'var(--affine-background-primary-color)',
},
},
},
},
@@ -33,9 +31,6 @@ export const navWrapperStyle = style({
'&[data-open="false"]': {
marginLeft: `calc(${navWidthVar} * -1)`,
},
'&[data-is-macos-electron="true"]': {
backgroundColor: 'transparent',
},
'&[data-enable-animation="true"]': {
transition: 'margin-left .3s, width .3s',
},
@@ -60,18 +55,9 @@ export const navHeaderStyle = style({
justifyContent: 'space-between',
alignItems: 'center',
gap: '32px',
'@media': {
[`(max-width: ${floatingMaxWidth}px)`]: {
selectors: {
'&[data-open="true"]': {
WebkitAppRegion: 'no-drag',
},
},
} as ComplexStyleRule,
},
WebkitAppRegion: 'drag',
selectors: {
'&[data-is-macos-electron="true"]': {
WebkitAppRegion: 'drag',
justifyContent: 'flex-end',
},
},