Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(electron): menu item position on Mac when fullscreen (#6200)

EYHN08b610bbad36
diff --git a/packages/frontend/core/src/components/app-sidebar/index.css.ts b/packages/frontend/core/src/components/app-sidebar/index.css.ts
index 21850df038..cbfd81c9cd 100644
--- a/packages/frontend/core/src/components/app-sidebar/index.css.ts
+++ b/packages/frontend/core/src/components/app-sidebar/index.css.ts
@@ -1,5 +1,5 @@
import { cssVar } from '@toeverything/theme';
-import { style } from '@vanilla-extract/css';
+import { globalStyle, style } from '@vanilla-extract/css';
export const floatingMaxWidth = 768;
export const navWrapperStyle = style({
zIndex: 3,
@@ -42,12 +42,16 @@ export const navHeaderStyle = style({
justifyContent: 'space-between',
alignItems: 'center',
['WebkitAppRegion' as string]: 'drag',
- selectors: {
- '&[data-is-macos-electron="true"]': {
- paddingLeft: '90px',
- },
- },
});
+
+globalStyle(
+ `html[data-maximized="false"]
+ ${navHeaderStyle}[data-is-macos-electron="true"]`,
+ {
+ paddingLeft: '90px',
+ }
+);
+
export const navBodyStyle = style({
flex: '1 1 auto',
height: 'calc(100% - 52px)',