Search code examples
nwjs

Get rid of unwanted padding/border around NWJS app?


My app is a frameless application. For some reason there is a 5px border around the window. I cant seam to get rid of it.

NWJS Version: nwjs-sdk-v0.87.0-linux-x64

index.sass

html, body
    border: none
    outline: none
    padding: none

    background-color: #444
    color: #fff

    overflow: hidden

package.json

{

    "name": "atomspace.calc",
    "description": "Calculator Application",
    "main": "./RESOURCES/INDEX.html",
    "version": "00.00.01",

    "window": {
        "icon": "./RESOURCES/VISUALS/FAVICON.png",
        "title": "AtomSpace Calculator App",
        "show_in_taskbar": true,
        "position": "center",
        "transparent": false,
        "resizable": false,
        "toolbar": false,
        "frame": false,

        "width": 400,
        "min_width": 400,
        "max-width": 400,

        "height": 500,
        "min_height": 500,
        "max_height": 500
    }

}

Screenshot of problem


Solution

  • I think you just need margin: 0px.

    I remember it by saying "Bumpo" which sounds like the name of a clown.

    BMP0

    html,
    body {
      border: 0px;
      margin: 0px;
      padding: 0px;
    }
    

    it helps that b m p is alphabetical too.

    Here's what I got to work: https://github.com/nwutils/nwutils.github.io/files/15445277/test.zip