# Codeblock text seems smaller

**URL:** https://meta.discourse.org/t/codeblock-text-seems-smaller/334132
**Category:** Site feedback
**Tags:** ux
**Created:** [November 2, 2024, 4:35am UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132 "2024-11-02T04:35:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [November 2, 2024, 4:35am UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/1 "2024-11-02T04:35:11Z")

</div>

The text in codeblocks seem small er than usual. For multiline codeblocks, the line spacing between lines also seem less.  
Was something changed?  
For example:

 ![The image shows a grey text box with a large amount of text. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/7/2/f/72f9b96863f5b035dcb7d3a7c166388c2b8c27d2.jpeg)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [November 2, 2024, 5:06am UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/2 "2024-11-02T05:06:41Z")

</div>

Recent update will see if can find link — found it in Daily Summary

> [@Improved code block sizing & color scheme](https://meta.discourse.org/t/improved-code-block-font-sizing/333946?silent=true):
>
> We’re experimenting with reducing the size of text and the line height, and increasing the height of code blocks, in order to improve readability of larger blocks of code. This is mostly problematic for large blocks of code exceeding 20 or more lines. The result is more code can be seen in the regular viewport. Before After The change has been made here: [https://github.com/discourse-org/design-experiments/pull/75](https://github.com/discourse-org/design-experiments/pull/75)

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 20, 2025, 11:15pm UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/3 "2025-01-20T23:15:05Z")

</div>

Why do preformatted code sizes seem even smaller  
Now: `Preformatted text`

```plaintext
Code here

```

 ![The image shows a code representation question by user NateDhaliwal regarding preformatted code sizes compared to regular text, presented on an online platform. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/a/d/ead3da9a08d53ca73acae7603a21ac4c8357dd23.jpeg)

Miniscule!

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 21, 2025, 1:04pm UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/4 "2025-01-21T13:04:24Z")

</div>

> [@NateDhaliwal](#):
>
> ![The image shows a grey text box with a large amount of text. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/7/2/f/72f9b96863f5b035dcb7d3a7c166388c2b8c27d2.jpeg)

This screenshot doesn’t give any information on the font-size compared to other texts.

> [@NateDhaliwal](#):
>
> Why do preformatted code sizes seem even smaller

Are you sure?

The code highlight file hasn’t changed since the last improvement linked by Dan:

> **[History for app/assets/stylesheets/common/base/code\_highlighting.scss -...](https://github.com/discourse/discourse/commits/8896cd746fa065ec8a29bc4f09d11d830ad4fbc6/app/assets/stylesheets/common/base/code_highlighting.scss)**
>
> A platform for community discussion. Free, open, simple. - History for app/assets/stylesheets/common/base/code\_highlighting.scss - discourse/discourse

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 21, 2025, 1:06pm UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/5 "2025-01-21T13:06:30Z")

</div>

> [@Canapin](#):
>
> This screenshot doesn’t give any information on the font-size compared to other texts.

That was an old screenshot, and is cropped.

> [@NateDhaliwal](#):
>
> Why do preformatted code sizes seem even smaller

Actually, it seems to be on mobile, not desktop.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 21, 2025, 1:12pm UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/6 "2025-01-21T13:12:33Z")

</div>

> [@NateDhaliwal](#):
>
> Actually, it seems to be on mobile, not desktop.

I looked at the font-size on both mobile and desktop, and they have the same value (.875em) 🙂

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 21, 2025, 11:53pm UTC](https://meta.discourse.org/t/codeblock-text-seems-smaller/334132/7 "2025-01-21T23:53:08Z")

</div>

Huh, that’s odd. Now the codeblocks are much more rounded too!

 ![The image displays an error message on a dark background, indicating a problem with adding an app file and a failed restore process. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/9/8/c/98c9c4f135fa9853d243936e751854988a4a066b.jpeg)
