Skip to content

Commit

Permalink
Update text styles (#27318)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Adds new text styles from
#21450 which was reverted in
#21517.

I'm adding the new styles, and updating a couple of the existing ones
(Title and Heading are the main changes, they're bigger now). Assuming
this is fine since we did this in the original PR.

## How I Tested These Changes

briefly went around the app and everything looked fine. The only
concrete changes are going to be title/headline are bigger now which
seems like the intention in the original PR:

<img width="281" alt="Screenshot 2025-01-23 at 1 14 38 PM"
src="https://github.com/user-attachments/assets/e039f856-a26d-45d1-91a1-bf0a10998199"
/>
<img width="366" alt="Screenshot 2025-01-23 at 1 14 29 PM"
src="https://github.com/user-attachments/assets/d3374088-7756-4098-afa2-6e78549c4b96"
/>
  • Loading branch information
salazarm authored Jan 23, 2025
1 parent 0de74c6 commit 768ef9c
Showing 1 changed file with 55 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ const Text = styled.span<TextProps>`
`;

export const Title = styled(Text)`
font-size: 24px;
font-size: 32px;
line-height: 36px;
font-weight: 600;
line-height: 30px;
-webkit-font-smoothing: antialiased;
`;

export const Heading = styled(Text)`
font-size: 18px;
font-weight: 500;
font-size: 20px;
line-height: 24px;
font-weight: 500;
-webkit-font-smoothing: antialiased;
`;

Expand Down Expand Up @@ -56,6 +56,8 @@ export const Subtitle2 = styled(Text)`
export const Body = styled(Text)`
font-family: ${FontFamily.default};
font-size: 14px;
line-height: 20px;
font-weight: 400;
`;

export const Body1 = styled(Text)`
Expand All @@ -71,6 +73,7 @@ export const Body2 = styled(Text)`
font-weight: 400;
`;

//Deprecated – Use BodySmall moving forward
export const Caption = styled(Text)`
font-family: ${FontFamily.default};
font-size: 12px;
Expand Down Expand Up @@ -101,10 +104,58 @@ export const Mono = styled(Text)`
font-family: ${FontFamily.monospace};
font-variant-ligatures: none;
font-size: 14px;
line-height: 20px;
font-weight: 400;
`;

export const CaptionMono = styled(Text)`
font-family: ${FontFamily.monospace};
font-variant-ligatures: none;
font-size: 12px;
`;
export const SubtitleLarge = styled(Text)`
font-size: 16px;
line-height: 20px;
font-weight: 500;
-webkit-font-smoothing: antialiased;
`;

export const Subtitle = styled(Text)`
font-size: 14px;
line-height: 20px;
font-weight: 500;
-webkit-font-smoothing: antialiased;
`;

export const SubtitleSmall = styled(Text)`
font-size: 12px;
line-height: 16px;
font-weight: 500;
`;

export const BodyLarge = styled(Text)`
font-size: 16px;
line-height: 20px;
font-weight: 400;
`;

export const BodySmall = styled(Text)`
font-family: ${FontFamily.default};
font-size: 12px;
line-height: 16px;
font-weight: 400;
`;

export const MonoLarge = styled(Text)`
font-family: ${FontFamily.monospace};
font-size: 16px;
line-height: 20px;
font-weight: 400;
`;

export const MonoSmall = styled(Text)`
font-family: ${FontFamily.monospace};
font-size: 12px;
line-height: 16px;
font-weight: 400;
`;

1 comment on commit 768ef9c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-5a3z9jf64-elementl.vercel.app

Built with commit 768ef9c.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.