-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Implicit 8 pixel margin added to html body #188
Comments
I came across this while investigating ways to create a full color fill of the display area as .infinte is not supported as a .frame() argument. |
This is a default style by the browser IIRC. You can setup the styles in your |
This makes sense, but it seems if you want to be "SwiftUI-ish" you may want to eliminate the default padding, as the presence of the padding will create a lack of visual parity between platforms. |
I agree that works well for Tokamak apps, but it could be included in an existing app, in which case we wouldn’t want to override any body styles. IMO it’s best to defer this to the developer. |
Got it. I'll close this out. |
Could you add some sample code here to show the recommended way to set the values in main.swift? |
This should work (although I haven't tested it): JSObjectRef.global.document.object!.body.object!.style = "margin: 0;" |
An 8-pixel pad in the main body of the page is present when using the following code:
You can see the padding in this screenshot:
The text was updated successfully, but these errors were encountered: