Skip to content

Commit

Permalink
gh-pages.css: override markbind's default container-fluid styling
Browse files Browse the repository at this point in the history
MarkBind automatically wraps the entire document in a div with the
`container-fluid` style class set:

    <div id="app" class="container-fluid">
        ... the document ...
    </div>

Bootstrap defines the container-fluid style class to have padding on the
left and right:

    .container-fluid {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        margin-right: auto;
        margin-left: auto;
    }

This makes our top navigation bar have empty space on the left and
right, which looks ugly.

Unfortunately, we can't remove the container-fluid style class since
MarkBind controls that part of the rendering.

So, let's fix this by overriding the container-fluid style rules on #app
in our gh-pages.css file.

MarkBind's default footer styling actually uses a (rather strange)
workaround:

    footer {
        margin-left: -15px;
        margin-right: -15px;
    }

Once the #app.container-fluid padding is overridden, footer's workaround
is no longer needed (and in fact will produce worse results by adding
scrollbars to the document since its margins will extend outside the
document).

So, let's workaround footer's workaround by overriding it.
  • Loading branch information
pyokagan committed Jul 28, 2018
1 parent 281c8ac commit d8f206f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions css/gh-pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,11 @@ table.tableblock > .title,
display: none;
}
}

#app.container-fluid {
padding: 0;
}

footer {
margin: 0;
}

0 comments on commit d8f206f

Please sign in to comment.