# \[SOLVED\] "Code" font sizes don't match (light / dark theme)

**URL:** <https://forum.literatureandlatte.com/t/solved-code-font-sizes-dont-match-light-dark-theme/152563>\
**Category:** General\
**Tags:** forum\
**Created:** [December 12, 2025, 6:20pm UTC](https://forum.literatureandlatte.com/t/solved-code-font-sizes-dont-match-light-dark-theme/152563 "2025-12-12T18:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [December 12, 2025, 6:20pm UTC](https://forum.literatureandlatte.com/t/solved-code-font-sizes-dont-match-light-dark-theme/152563/1 "2025-12-12T18:20:22Z")

</div>

Light: 14px

```css
code {
	/* ... */
	font-size: 14px;
	/* ... */
}

```

 ![light](https://forum.literatureandlatte.com/uploads/default/original/3X/a/a/aaf66868f994f16e3739e0ceae11610ad5c00116.png)

Dark: 15.75px

```css
@media (prefers-color-scheme: dark) {
	pre>code {
		/* ... */
		font-size: var(--base-font-size-smaller);
		/* ... */
	}
}

```

 ![dark](https://forum.literatureandlatte.com/uploads/default/original/3X/b/d/bdd5ae1970b6319a367432e2d4aeded55a8a1f29.png)

@AmberV probably

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [December 12, 2025, 7:24pm UTC](https://forum.literatureandlatte.com/t/solved-code-font-sizes-dont-match-light-dark-theme/152563/2 "2025-12-12T19:24:56Z")

</div>

Thanks! These are all perceptually looking the same to me now, in Light, Light with dynamic dark mode, and Dark. I couldn’t actually find a static font size declaration like in your first example—but it didn’t have _any_, so that might be a browser fallback (or maybe a fundamental theme fallback as my themes are a subset of the stock look). All modes are now explicitly set to use the variable scaling as determined by interface settings in one’s site preferences.

---

<div class="post-metadata">

**Author:** ![November\_Sierra](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/november_sierra/32/41086_2.png) [@November\_Sierra](https://forum.literatureandlatte.com/u/November_Sierra)\
**Post date:** [December 12, 2025, 7:35pm UTC](https://forum.literatureandlatte.com/t/solved-code-font-sizes-dont-match-light-dark-theme/152563/3 "2025-12-12T19:35:17Z")

</div>

Thanks, that was quick! Both use `font-size: var(--base-font-size-smaller);` now and look identical (size-wise)! 👍

(Can’t tell where it came from before, it was just the last / top entry in developer tools and I didn’t bother digging further.)
