What am I missing with this white border around the entire table image? #456
-
Just a little help on why I've got this white border around the entirety of my table image upon saving. I use the dark theme in VSCode and when viewing the table, prior to saving the image, it fills it's allocation right up to the edges, however when viewing the .png after saving it has a white border around it - am I missing something in my code?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, removing the padding around the table is a bit tricky, due to various quirks across browsers (and more quirks in how they run
I think some of this could be fixed (e.g. by disabling some of the body padding, margins, etc.. via css, and maybe using the css border-box setting). But it's a bit finicky getting everything right across browsers, so we opted for a small margin of space for robustness. As a work-around, you could open the image, and trim down the margins in a tool like PIL (which we use to save pngs). I realize it's not ideal, but the risk of us trying to tighten up the capture is cropping out part of the table 😓. (I definitely think someone more knowledgeable in all things headless browsers x css x layout quirks could get the framing a bit tighter..) |
Beta Was this translation helpful? Give feedback.
Hey, removing the padding around the table is a bit tricky, due to various quirks across browsers (and more quirks in how they run
in headless mode). I think in this case, the border is likely due to two pieces:
<body>
)I think some of this could be fixed (e.g. by disabling some of the body padding, margins, etc.. via css, and maybe using the css border-box setting). But it's a bit fi…