From 3aea051d6e3ddfc9a4d04f077e7a487106b6405b Mon Sep 17 00:00:00 2001 From: David Smehlik Date: Wed, 23 Mar 2022 19:59:43 -0700 Subject: [PATCH] Improve typographical contrast of article titles --- .../lesswrong/components/posts/PostsPage/PostsPageTitle.tsx | 3 ++- .../components/recentDiscussion/RecentDiscussionThread.tsx | 4 +++- packages/lesswrong/themes/pfTheme.ts | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/lesswrong/components/posts/PostsPage/PostsPageTitle.tsx b/packages/lesswrong/components/posts/PostsPage/PostsPageTitle.tsx index d5023d692ed..893c29ce7af 100644 --- a/packages/lesswrong/components/posts/PostsPage/PostsPageTitle.tsx +++ b/packages/lesswrong/components/posts/PostsPage/PostsPageTitle.tsx @@ -9,9 +9,10 @@ export const postPageTitleStyles = theme => ({ ...theme.typography.display3, ...theme.typography.postStyle, ...theme.typography.headerStyle, + lineHeight: 1.25, marginTop: 0, marginLeft: 0, - marginBottom: forumTypeSetting.get() === 'EAForum' ? theme.spacing.unit : 0, + marginBottom: forumTypeSetting.get() === 'EAForum' ? theme.spacing.unit : 8, color: theme.palette.text.primary, [theme.breakpoints.down('sm')]: { fontSize: '2.5rem', diff --git a/packages/lesswrong/components/recentDiscussion/RecentDiscussionThread.tsx b/packages/lesswrong/components/recentDiscussion/RecentDiscussionThread.tsx index 04ce7ff8dd5..aec3f63d099 100644 --- a/packages/lesswrong/components/recentDiscussion/RecentDiscussionThread.tsx +++ b/packages/lesswrong/components/recentDiscussion/RecentDiscussionThread.tsx @@ -98,8 +98,10 @@ const styles = (theme: ThemeType): JssStyles => ({ flexGrow: 1, marginTop: 0, marginBottom: 8, + marginRight: 8, display: "block", - fontSize: "1.75rem", + fontSize: "1.9rem", + lineHeight: 1.25, }, actions: { "& .PostsPageActions-icon": { diff --git a/packages/lesswrong/themes/pfTheme.ts b/packages/lesswrong/themes/pfTheme.ts index 4ff3b1d04c3..b4638c46ada 100644 --- a/packages/lesswrong/themes/pfTheme.ts +++ b/packages/lesswrong/themes/pfTheme.ts @@ -60,7 +60,7 @@ const theme = createLWTheme({ typography: { fontDownloads: [ "https://fonts.googleapis.com/css?family=Mukta:300,400,500,600", - "https://fonts.googleapis.com/css?family=Source+Serif+Pro:300,400,500,600", + "https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&display=swap", ], fontFamily: sansSerifStack, postStyle: { @@ -68,6 +68,7 @@ const theme = createLWTheme({ }, headerStyle: { fontFamily: serifStack, + fontWeight: 700, }, caption: { // captions should be relative to their surrounding content, so they are unopinionated about fontFamily and use ems instead of rems