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(web): css in mobile (#1731)

Himself656917d2100f4c
diff --git a/apps/web/src/components/blocksuite/block-suite-page-list/page-list/styles.ts b/apps/web/src/components/blocksuite/block-suite-page-list/page-list/styles.ts
index a0a1fe3454..61742c0b12 100644
--- a/apps/web/src/components/blocksuite/block-suite-page-list/page-list/styles.ts
+++ b/apps/web/src/components/blocksuite/block-suite-page-list/page-list/styles.ts
@@ -1,11 +1,14 @@
import { displayFlex, styled } from '@affine/component';
import { TableRow } from '@affine/component';
-export const StyledTableContainer = styled('div')(() => {
+export const StyledTableContainer = styled('div')(({ theme }) => {
return {
height: 'calc(100vh - 60px)',
padding: '78px 72px',
overflowY: 'auto',
+ [theme.breakpoints.down('sm')]: {
+ padding: '12px 24px',
+ },
};
});
export const StyledTitleWrapper = styled('div')(({ theme }) => {
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index 17f66e3a13..3036683ffa 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -208,3 +208,15 @@ affine-block-hub {
.block-hub-menu-container {
position: unset !important;
}
+
+@media (max-width: 768px) {
+ .affine-default-page-block-title-container {
+ margin-top: 24px;
+ }
+
+ .editor-wrapper {
+ width: 100%;
+ height: 100%;
+ padding: 0 0.75rem;
+ }
+}
diff --git a/packages/component/src/ui/table/styles.ts b/packages/component/src/ui/table/styles.ts
index 1b0858b37a..e7c8896a76 100644
--- a/packages/component/src/ui/table/styles.ts
+++ b/packages/component/src/ui/table/styles.ts
@@ -11,6 +11,9 @@ export const StyledTable = styled('table')<{ tableLayout: 'auto' | 'fixed' }>(
minWidth: '600px',
borderCollapse: 'separate',
borderSpacing: '0',
+ [theme.breakpoints.down('sm')]: {
+ minWidth: 'unset',
+ },
};
}
);