What's the proper way to set line height, besides in the settings UI?


#1

I know we can set line height in the Editor settings, but what’s the proper way to do it in code or config file?

Right now, I have this in my stylesheet:

atom-text-editor {
    --editor-line-height: 1em;
}

which basically works, but has some problems that causes things not to be aligned when I first open Atom, then interacting with text jiggers things into place (f.e. indent guides).

Maybe it’s something in my config file. hmmmm…

For the tree view, I also have this in my stylesheet:

.tree-view {
    .list-item {
        line-height: 1.5em !important;
    }
    .selected:before {
        height: 1.4em;
    }
}

But I don’t think there’s a way to configure that in another way. Or is there?