# Font size for code inserts in posts

**URL:** https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424
**Category:** Support
**Created:** [April 4, 2019, 8:56am UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424 "2019-04-04T08:56:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![SMx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smx/32/83713_2.png) [@SMx](https://meta.discourse.org/u/SMx)
#### Post date: [April 4, 2019, 8:56am UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424/1 "2019-04-04T08:56:35Z")

</div>

The font size of code inserts seems unreasonably large.

For example, I’m used to be able to fit a line like this into a window without scrolling sideways.

```
local tripped_bedr = luup.variable_get("urn:mcs-com:serviceId:SecuritySensor1", "Tripped", 32)

```

Any possibility to change this for the better?

Thank you.

---

<div class="post-metadata">

### Author: ![cjk77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cjk77/32/151779_2.png) [@cjk77](https://meta.discourse.org/u/cjk77)
#### Post date: [April 4, 2019, 12:15pm UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424/2 "2019-04-04T12:15:36Z")

</div>

Easy enough to do by overriding the CSS in a theme component:

```css
code {
     font-size: 0.8em
}

```

(If you’re not familiar with theme components, there’s more info [here](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682).)

---

<div class="post-metadata">

### Author: ![SMx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smx/32/83713_2.png) [@SMx](https://meta.discourse.org/u/SMx)
#### Post date: [April 4, 2019, 12:27pm UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424/3 "2019-04-04T12:27:00Z")

</div>

Yep, that’s all I needed. I’m familiar with components. Thank you so much.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [April 4, 2019, 4:00pm UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424/4 "2019-04-04T16:00:23Z")

</div>

You can also use `white-space: pre-wrap;` if you want to completely avoid horizontal scrolling (and if preserving line-breaks isn’t important in your specific case)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 4, 2019, 4:00pm UTC](https://meta.discourse.org/t/font-size-for-code-inserts-in-posts/113424/5 "2019-05-04T16:00:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
