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

Improve codeblock formatting in documentation #629

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

jogly
Copy link
Contributor

@jogly jogly commented Mar 20, 2024

Improves codeblock highlighting by:

  • Adding context to the codeblock detailing which language the following code is.
  • Setting the pre block's background to match the default background for code blocks to give a consistent experience.
  • Setting a border radius for the pre block double that of the code block's default (4px, which is hard-coded).

Works on class documentation blocks and li code blocks for properties/members/methods.

Before

image image

After

image image

jogly added 3 commits March 20, 2024 12:52
Improves codeblock highlighting by:

 -  Adding context to the codeblock detailing which language the
    following code is.
 -  Setting the `pre` block's background to match the default
    background for `code` blocks to give a consistent experience.
 -  Setting a border radius for the `pre` block double that of the
    `code` block's default (4px, which is hard-coded).
@DaelonSuzuka
Copy link
Collaborator

That's awesome, thank you.

@DaelonSuzuka DaelonSuzuka merged commit ecaf1db into godotengine:master Mar 22, 2024
4 checks passed
@jogly jogly deleted the style-codeblock branch March 22, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants