defunkt/Zen

No padding at top of document

Closed this issue · 10 comments

When I activate Zen, the padding that used to appear at the top has not been present for a while now, and the top line of text sticks very close to the top of my screen:

screen shot 2015-05-27 at 12 26 33

Is there any way I can fix this? I tried disabling all the installed extensions as well as most of the default ones without luck.

Hello @RaoOfPhysics,

you can try adding this to your personal stylesheet:

[data-zen="true"] {
  atom-text-editor:not(.mini) {
    padding-top: 20px; // Change this to your liking
  }
}

This works for me.

Yes, that should work. The lack of padding at the top is by design.

@rm-code: That worked, many thanks! :)

@braver: Ah, I see. I thought it was a problem at my end because the screenshot in the README shows a padding (and indeed I happened to have had a padding for a while previously):

A setting for padding in the GUI might be nice. :)

I played around with a setting for the padding, but I didn't manage to make Zen restore the original padding options when exiting zen mode. Maybe @braver has more insight.

@RaoOfPhysics
I use the "multiple" tabs option with these custom style settings in my personal style sheet:
screenshot 2015-05-27 15 25 29
It produces a nice padding and makes the tabs unobtrusive. (It works for most of the themes I have installed).

Thanks, @rm-code, this is very helpful. :)

@rm-code thanks for the code example! But it leads to the text cutting of at the top (more of margin than padding):
capture du 2015-10-14 11-09-02
Is there another rule which will make it correctly scroll up further and visible?

@braver I’m not usually one to ask for settings (am a designer myself) but it’s very strange to have the text stick to the top. If it’s not going to be considered for the default style, a setting might be cool for this.

What you're asking for, padding the top of the document so you can scroll it down from the top of the view, is as far as I know not possible. Everything you add at the top you lose at the bottom and several layers (highlights, gutter) need to be adjusted.
Zen used to have what your screenshot shows, but that just looks weird and tacky. I would love to have proper padding as a default, it's just that I don't know how to make it happen, and what your screenshot shows is just not acceptable as a compromise.

Fiddling a bit, I got a solution where you don't use padding, you use margin. It has no issues with scrolling. Con: you lose the editor's background color, and get the window's background color instead.

[data-zen=true] {
  atom-text-editor:not(.mini) {
    margin-top: 50px;
    margin-bottom: 50px;
    background: transparent;
  }
}

@dasilvacontin I tried that before as well of course and it has the same issue with being cut off:
capture du 2016-03-30 11-15-31

@jancborchardt Ah, yeah, it will always have a margin... I'll let you know if I come up with something else.