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: style ui

DiamondThree46f903583b2f
diff --git a/libs/components/editor-blocks/src/blocks/group/GroupView.tsx b/libs/components/editor-blocks/src/blocks/group/GroupView.tsx
index 193a97f076..9b0f0f9101 100644
--- a/libs/components/editor-blocks/src/blocks/group/GroupView.tsx
+++ b/libs/components/editor-blocks/src/blocks/group/GroupView.tsx
@@ -38,6 +38,7 @@ const GroupActionWrapper = styled('div')(({ theme }) => ({
visibility: 'hidden',
fontSize: theme.affine.typography.xs.fontSize,
color: theme.affine.palette.icons,
+ opacity: 0.6,
'.line': {
flex: 1,
height: '15px',
diff --git a/libs/components/editor-blocks/src/blocks/text/TextView.tsx b/libs/components/editor-blocks/src/blocks/text/TextView.tsx
index cb408cb189..2f26e17c38 100644
--- a/libs/components/editor-blocks/src/blocks/text/TextView.tsx
+++ b/libs/components/editor-blocks/src/blocks/text/TextView.tsx
@@ -46,6 +46,7 @@ const TextBlock = styled(TextManage)<{ type: string }>(({ theme, type }) => {
return {
fontSize: textStyleMap.text.fontSize,
lineHeight: textStyleMap.text.lineHeight,
+ fontWeight: textStyleMap.text.fontWeight,
};
}
});
diff --git a/libs/components/editor-blocks/src/blocks/todo/TodoView.tsx b/libs/components/editor-blocks/src/blocks/todo/TodoView.tsx
index b45c07a796..e5588d46f4 100644
--- a/libs/components/editor-blocks/src/blocks/todo/TodoView.tsx
+++ b/libs/components/editor-blocks/src/blocks/todo/TodoView.tsx
@@ -150,6 +150,7 @@ const TodoBlock = styled('div')({
display: 'flex',
'.checkBoxContainer': {
marginRight: '4px',
+ padding: '0 4px',
height: '22px',
},
'.textContainer': {
diff --git a/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx b/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx
index 2e146c7701..7928375a32 100644
--- a/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx
+++ b/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx
@@ -39,6 +39,9 @@ export type ExtendedTextUtils = SlateUtils & {
};
const TextBlockContainer = styled(Text)(({ theme }) => ({
lineHeight: theme.affine.typography.body1.lineHeight,
+ fontFamily: theme.affine.typography.body1.fontFamily,
+ color: theme.affine.typography.body1.color,
+ letterSpacing: '0.1px',
}));
const findSlice = (arr: string[], p: string, q: string) => {
diff --git a/libs/components/ui/src/theme/theme.ts b/libs/components/ui/src/theme/theme.ts
index 70aace8122..b8055da052 100644
--- a/libs/components/ui/src/theme/theme.ts
+++ b/libs/components/ui/src/theme/theme.ts
@@ -173,26 +173,34 @@ export const Theme = {
body1: {
fontSize: '16px',
lineHeight: '22px',
+ fontWeight: 400,
+ fontFamily: 'PingFang SC',
+ color: '#3A4C5C',
},
h1: {
fontSize: '28px',
lineHeight: '40px',
+ fontWeight: 600,
},
h2: {
fontSize: '24px',
lineHeight: '34px',
+ fontWeight: 600,
},
h3: {
fontSize: '20px',
lineHeight: '28px',
+ fontWeight: 600,
},
h4: {
fontSize: '16px',
lineHeight: '22px',
+ fontWeight: 600,
},
page: {
fontSize: '36px',
lineHeight: '44px',
+ fontWeight: 600,
},
callout: {
fontSize: '36px',
@@ -221,6 +229,7 @@ export const Theme = {
articleTitle: {
fontSize: '36px',
lineHeight: '54px',
+ fontWeight: 600,
},
},
shadows: {