Add code font configuration option alongside heading and body in fonts #4468
adriamontoto
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the
fontsconfiguration indocs.jsonsupports setting custom fonts forheadingandbody, but there's no equivalent option for code blocks and inline code snippets. To customize the code font today, you have to resort to custom CSS overrides, which feels inconsistent with the clean declarative approach available for other typography.It would be awesome to add a
codeproperty to thefontsobject (with the samefamily,weight,source, andformatfields) so users can configure their monospace/code font directly indocs.json— for example:{ "fonts": { "heading": { "family": "Inter", "weight": 700 }, "body": { "family": "Inter", "weight": 400 }, "code": { "family": "JetBrains Mono", "weight": 400 } } }Beta Was this translation helpful? Give feedback.
All reactions