hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Padding can't be set to 0

Open oguzbilgic opened this issue 7 years ago • 5 comments

  • [X] I am on the latest Hyper.app version
  • [X] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: macOS 10.14
  • Hyper.app version: 2.1.0
  • Link of a Gist with the contents of your .hyper.js: default config

Issue

Setting padding to 0 doesn't actually set padding/margin to 0

screen shot 2018-12-23 at 3 33 55 pm

oguzbilgic avatar Dec 23 '18 12:12 oguzbilgic

I have the same problem, it seens xterm-screen has the wrong size.

yoyoys avatar Oct 09 '19 07:10 yoyoys

I would like to be able to set the padding all to zero. It is not feeling good to have large padding by default. I realized the top and left padding could be set to zero but the right and bottom has some default padding values that could not be override. I am in Linux 18.

mbiparva avatar Nov 09 '19 15:11 mbiparva

On Mac OS this key combination opens the inspector window: Cmd + Option + i

What is seen is, hyperjs defines a fixed width and height on one of the inner containers --the defined height and width are too short or narrow.

The following has an interesting effect on when added to the hyperjs custom config. Essentially, the "gap" goes away but the font looks a little bit blurry.

{
    css: `
      .term_fit > .terminal > .xterm-screen {
        width: 100vw !important;
      }
      .term_fit > .terminal > .xterm-screen canvas {
        width: 100vw !important;
      }
    `,
}

If we experiment and resize the window in different ways, the size of the gap changes and so, perhaps, hyper.js needs to set the fixed width that guarantees font-clarity and sometimes the width or height need to be smaller than the window itself.

If possible, it would be nice to have a setting that would snap the window to match the size of the terminal needed for clear font rendering.

This custom css style seems to be the best solution now --it centers the fixed width and height area so that the gaps are less-pronounced

{
    css: `
      .term_fit > .terminal {
        display: flex;
        align-items: center;
        justify-content: center;
      }   `
}

iambumblehead avatar Aug 04 '22 17:08 iambumblehead

@iambumblehead Thank you, it's working for me :)

philsitumorang avatar Mar 04 '23 13:03 philsitumorang

I just ran into this as well, changing the padding still does not remove the gap in the terminal.

Thanks to @iambumblehead for the initial solution! I adjusted it a bit and for me this worked perfectly:

css:`
  .xterm-screen {
    width:100% !important;
    height:100% !important;
  }
  .xterm-screen canvas {
    width:100% !important;
    height:100% !important;
  }
  .terminal {
    height:100% !important;
  }
`,

The gap goes away and i dont have any problem with blurry font.

KaiTries avatar Mar 15 '24 09:03 KaiTries