Thread
#compose-web
    LeoColman

    LeoColman

    1 year ago
    Do you guys face this? If you pay attention you'll see that on all margins there's a small white 'padding', although I didn't configure any spacing on the sides. Is it possible to disable this? Or is this just the standard? (Backender Kotliner trying to play with frontend a bit 😅 )
    g

    Greg Steckman

    1 year ago
    If you right click on the page and "inspect", you can see the html that is generated for the page, what classes are applied to each tag, and what css is in those classes. There's probably a margin in there somewhere.
    LeoColman

    LeoColman

    1 year ago
    I couldn't find any margin or padding on inspect. Although if I do
    margin = -10px
    on root it will remove this white border
    I think it's on
    body
    by default
    g

    Greg Steckman

    1 year ago
    Is there a css class applied to the body?
    LeoColman

    LeoColman

    1 year ago
    No, there's nothing applied to the body. I mean, there is now:
    <body style="margin: 0">
            <div id="root"></div>
            <script src="SeMudandoFront.js"></script>
        </body>
    as this will fix the white margin, but it seems weird to me to have to apply this
    g

    Greg Steckman

    1 year ago
    there could be a .body css selector in the stylesheet, applying a margin.
    LeoColman

    LeoColman

    1 year ago
    The default stylesheet is empty
    object AppStyleSheet : StyleSheet() {
        val primary = Color("#023e8a")
        val primaryLight = Color("#02558b")
    
        val accent = Color("#eb4a3b")
        val accentLight = Color("#d9554d")
    }
    g

    Greg Steckman

    1 year ago
    if there is, the style attribute in the html will override that.
    LeoColman

    LeoColman

    1 year ago
    The code is available here:https://github.com/SeMudando/SeMudandoFront If you want to take a close look
    g

    Greg Steckman

    1 year ago
    Is this whole page generated with compose-web, without any css file?
    LeoColman

    LeoColman

    1 year ago
    No css file, that's correct. Only the StyleSheet
    g

    Greg Steckman

    1 year ago
    So you'll need to fix it by setting the body margin to 0
    LeoColman

    LeoColman

    1 year ago
    Ah, I see, so this isn't an issue with compose itself. Interesting that this is the default behavior! Thanks for the help, @Greg Steckman!
    I've turned our conversation into a Q/A in stackoverflow. Maybe this question pops up in the futurehttps://stackoverflow.com/questions/69337324/white-border-on-webpage/69337325#69337325
    Oh I just read your stack overflow answer seems like you fixed it already yourself. Yes this was a "fun" few hours of a rabbit hole I also encountered and couldn't figure out at first