Merge pull request #183 from toeverything/fix/style

fix: style ui
This commit is contained in:
DiamondThree 2022-08-10 18:44:30 +08:00 committed by GitHub
commit 696a7785e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 8 deletions

View File

@ -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',

View File

@ -109,12 +109,15 @@ export const PageView: FC<CreateView> = ({ block, editor }) => {
);
};
const PageTitleBlock = styled('div')({
'.title': {
fontSize: Theme.typography.page.fontSize,
lineHeight: Theme.typography.page.lineHeight,
},
'.content': {
outline: 'none',
},
const PageTitleBlock = styled('div')(({ theme }) => {
return {
'.title': {
fontSize: theme.affine.typography.page.fontSize,
lineHeight: theme.affine.typography.page.lineHeight,
fontWeight: theme.affine.typography.page.fontWeight,
},
'.content': {
outline: 'none',
},
};
});

View File

@ -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,
};
}
});

View File

@ -150,6 +150,7 @@ const TodoBlock = styled('div')({
display: 'flex',
'.checkBoxContainer': {
marginRight: '4px',
padding: '0 4px',
height: '22px',
},
'.textContainer': {

View File

@ -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) => {

View File

@ -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: {