Skip to content

I spent HOURS trying to change this padding #1409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
InvisibleGeeksBalbiano opened this issue Mar 31, 2025 · 2 comments
Open

I spent HOURS trying to change this padding #1409

InvisibleGeeksBalbiano opened this issue Mar 31, 2025 · 2 comments

Comments

@InvisibleGeeksBalbiano
Copy link

When yo initialize a rendition, epub generates a body tag with this style properties:

style="width: 1159px; height: 667px; overflow-y: hidden; margin: 0px !important; padding-top: 20px; padding-bottom: 20px; padding-left: 48px !important; padding-right: 48px !important; box-sizing: border-box; max-width: inherit; column-fill: auto; column-gap: 96px; column-width: 1159px;"

I WANT TO REMOVE THAT !IMPORTANT (such a bad practice) directive from the horizontalPadding and I can't.
I tried in node_modules (deleting paddings and importants), overrides, everything, please. I have a Figma desing without the padding.

@blueskoo
Copy link

book.renderTo("ePubViewer",{manager:"default",flow: layoutFlow,width:width,height:height,defaultDirection:rtl ? 'rtl' : 'ltr',allowScriptedContent:true,gap:yourGapValue,columnWidth:600,minSpreadWidth:800,method:'blobUrl'} as any)

padding calculation use gap value, set appropriate value can override the padding.

@blueskoo
Copy link

You should destroy rendition then generate new one.

this is for dynamic set padding when resizing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants