Skip to content

Commit

Permalink
fix: adds missing width property to grav-l-container() mixin
Browse files Browse the repository at this point in the history
affects: @buildit/gravity-ui-web

The \`grav-l-container\` mixin, that is used by the \`.grav-o-container\` class and also within the page
header and footer components, sets a \`max-width\` but does not set an explicit \`width\`. Normally this
is not an issue since block elements will naturally expand horizontally to fill the available space.
However, when used on direct descendents of \`<body>\`, which are laid out by flexbox 9for the sticky
footer behaviour), the elements shrink to fit the width of their content which causes them to then
appear centered on the page. This fix adds a \`width: 100%;\` to the mixin, which counteracts this
behaviour.
  • Loading branch information
James Nash committed Jun 19, 2019
1 parent 8235e6e commit bab1f9a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// a simple mixin to create a container for the page
@mixin grav-l-container($no-margin: false) {
width: 100%;
max-width: $grav-page-content-max-width;

// IE10+ bug that happens when using margin: auto
Expand Down

0 comments on commit bab1f9a

Please sign in to comment.