Skip to content

Commit

Permalink
ENGCOM-2476: Adjust page-main container height for sticky footer; fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Jul 26, 2018
2 parents 18aa2d1 + ec77623 commit 5cf69d2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@
.lib-css(background-color, @page__background-color);
}

.page-wrapper {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(column);
min-height: 100vh; // Stretch content area for sticky footer
}

.page-main {
.lib-vendor-prefix-flex-grow(1);
}

//
// Header
// ---------------------------------------------
Expand Down Expand Up @@ -279,17 +289,7 @@
// _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {

html,
body {
height: 100%; // Stretch screen area for sticky footer
}

.page-wrapper {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(column);
min-height: 100%; // Stretch content area for sticky footer

> .breadcrumbs,
> .top-container,
> .widget {
Expand Down
4 changes: 0 additions & 4 deletions app/design/frontend/Magento/blank/web/css/source/_layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@
.page-main {
width: 100%;

.lib-vendor-prefix-flex-grow(1);
.lib-vendor-prefix-flex-shrink(0);
.lib-vendor-prefix-flex-basis(auto);

.ie9 & {
width: auto;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@
.lib-css(background-color, @page__background-color);
}

.page-wrapper {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(column);
min-height: 100vh; // Stretch content area for sticky footer
}

.page-main {
.lib-vendor-prefix-flex-grow(1);
}

//
// Header
// ---------------------------------------------
Expand Down Expand Up @@ -313,14 +323,12 @@
//
// Widgets
// ---------------------------------------------
// @codingStandardsIgnoreStart caused by bug in CodeSniffer implementation
.sidebar {
.widget.block:not(:last-child),
.widget:not(:last-child) {
margin-bottom: @indent__xl;
}
}
// @codingStandardsIgnoreEnd

.widget {
clear: both;
Expand Down Expand Up @@ -418,12 +426,6 @@
}
}
}
.page-footer,
.copyright {
bottom: 0;
position: absolute;
width: 100%;
}
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
Expand Down Expand Up @@ -616,10 +618,7 @@
}

.page-wrapper {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(column);
margin: 0;
min-height: 100%; // Stretch content area for sticky footer
position: relative;
transition: margin .3s ease-out 0s;

Expand Down

0 comments on commit 5cf69d2

Please sign in to comment.