# How to make reader mode and edit mode line height look the same

**URL:** <https://forum.obsidian.md/t/how-to-make-reader-mode-and-edit-mode-line-height-look-the-same/59217>\
**Category:** Help\
**Created:** [May 5, 2023, 5:24pm UTC](https://forum.obsidian.md/t/how-to-make-reader-mode-and-edit-mode-line-height-look-the-same/59217 "2023-05-05T17:24:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![efemkay](https://forum.obsidian.md/user_avatar/forum.obsidian.md/efemkay/32/26644_2.png) [@efemkay](https://forum.obsidian.md/u/efemkay)\
**Post date:** [May 14, 2023, 5:29pm UTC](https://forum.obsidian.md/t/how-to-make-reader-mode-and-edit-mode-line-height-look-the-same/59217/3 "2023-05-14T17:29:54Z")

</div>

@navy2x i would agree with you making the line height/spacing the same between the two mode is somewhat beyond genpop of obsidian users especially if you use default theme. Most community themes tackle that. So here’s what i have that makes it quite consistent between the two.

i have the margin for the spacing declared as it’s own variable in case you want to increase it somehow.

```css
    body {
        --margin-in-between: 0em;
    }
    /* adjust margin between paragraph and ul/ol */
    div:has(> p) ~ div:has(> p) p {
        margin-top: calc(var(--line-height-normal) * 0.88rem);
        margin-block-end: var(--margin-in-between);
    }
    div:has(p) + div:has(ul,ol) > :is(ul,ol) {
        margin-block-start: var(--margin-in-between);
    }
    /* adjust margin between headers and ul/ol. Had to use 0.88rem because default app's line-height somehow uses hardcoded 1.4 instead on line-height-normal: 1.5 */
    .markdown-rendered :is(h1,h2,h3,h4,h5,h6) {
        margin-top: calc(var(--line-height-normal) * 0.88rem);
        margin-bottom: var(--margin-in-between);
    }
    .markdown-rendered :has([data-heading]) + div:has(ul,ol) :is(ul,ol) {
        margin-top: var(--margin-in-between);
    }

```

> i think it’s consistent enough…
> 
> ![image](https://forum.obsidian.md/uploads/default/original/3X/f/d/fd1b1ae2198edfe302cffb290608c8e961fdc054.png)

---

_[View the full topic](https://forum.obsidian.md/t/how-to-make-reader-mode-and-edit-mode-line-height-look-the-same/59217)._
