Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inline code font size #753

Merged
merged 7 commits into from
Mar 5, 2020
Merged

fix: inline code font size #753

merged 7 commits into from
Mar 5, 2020

Conversation

alisonjoseph
Copy link
Member

Closes #459

@alisonjoseph alisonjoseph requested review from a team, vpicone and sstrubberg and removed request for a team March 3, 2020 21:42
@vercel
Copy link

vercel bot commented Mar 3, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/carbon-design-system/gatsby-theme-carbon/f6yafovch
✅ Preview: https://gatsby-theme-carbon-git-fork-alisonjoseph-fix-code-size.carbon-design-system.now.sh

td > code {
font-size: 12px;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Without this it was computing to 12.25px instead of 12px. Has something to do with the specificity in the page-table scss file.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think It was computing to 12.25 because it was using em. So when the font size goes down to 14, .875*14 = 12.25

@@ -11,13 +11,17 @@
position: relative;
display: inline;
padding: 0 0.5em;
font-size: 0.75em;
font-size: 0.875em;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
font-size: 0.875em;
font-size: 0.75rem;

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like it shoulda been rem so it's relative to the root instead of whatever the current font-size is.

Copy link
Member Author

Choose a reason for hiding this comment

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

@vpicone changing it to .75rem makes it too small(12). should be 14px for body text.

Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops! My bad, I’d just leave the r in there so it’s /16 instead of /whatever the current font size is.

@vercel vercel bot temporarily deployed to Preview March 5, 2020 03:35 Inactive
@alisonjoseph
Copy link
Member Author

@vpicone just updated to .875rem for body text and .75rem for text inside table cells. Looks like both are rendering correctly now at 14px / 12px.

@vpicone vpicone merged commit acf5076 into carbon-design-system:master Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix[inline code snippet]: sizing incorrect
3 participants