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

[docs] Uniformize the code's font family #28582

Merged
merged 8 commits into from
Sep 28, 2021

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 24, 2021

Before: https://mui.com/components/alert/#basic-alerts
After: https://deploy-preview-28582--material-ui.netlify.app/components/alert/#basic-alerts

This is an effort to simplify the font logic. We were using two different font families for the marketing and docs. We are now only using one. We are using the built-in fonts, which are more performant (to load), and closer to what developers might already be used to. However, it doesn't give us a unique brand identity feel.

We also did a couple of side cleaning:

  • Remove commented code
  • Remove use of font-weight: bold. Prefer theme design tokens or at the very least the 500, 600, 700, etc. scale
  • Reduce the number of CSS overrides, the aim is to have a CSS -> style mapping as direct as possible

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation website Pages that are not documentation-related, marketing-focused. labels Sep 24, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 24, 2021

No bundle size changes

Generated by 🚫 dangerJS against 440266c

@siriwatknp
Copy link
Member

@oliviertassinari

  • code font-size seems to change, is that expected? (is it not too big)
  • Also, would it make sense to reduce the code font-size in mobile?

@oliviertassinari
Copy link
Member Author

@siriwatknp Ok, fair enough, I have reverted the font-size change, it's 13px now on the docs. Ant Design uses 13px, GitHub 11px. VS Code, in my environment, feels like 13.5px by default React.js 14px.

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@oliviertassinari oliviertassinari changed the title [docs] Uniformize the code typography [docs] Uniformize the code's font family Sep 28, 2021
@oliviertassinari oliviertassinari merged commit 64cb9eb into mui:master Sep 28, 2021
@oliviertassinari oliviertassinari deleted the normalize-code-font branch September 28, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation website Pages that are not documentation-related, marketing-focused.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants