Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

sticky footer issue with flex-basis #544

Closed
@mattiLeBlanc

Description

@mattiLeBlanc

Bug, feature request, or proposal:

Checking my app on IE10-11 uncovered I was see an issue with my sticky footer. It was not sticky, but just say under the content block positioned above:

+site(fxLayout="column" fxFlex)
  |- header
  |- content(fxFlex)
  |- footer
==white-space==

So I went back to the article written by Philip Walton a couple of years ago, https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/, and implemented his fix.

However, I was a bit puzzled that this fix is still required nowadays.
So I was wondering if we still need to do this:

+site(fxLayout="column" fxFlex) --> add height: 100%
  |- header  --> add flex-shrink: 0
  |- content(fxFlex)  --> add flex: 1 0 auto
  |- footer -->add flex-shrink: 0

Only if I add the flex:1 0 auto to the content block, will it work fine in Chrome. I am actually overriding fxFlex at this moment.

What is the expected behavior?

Header at top, content stretched and footer sticky at the bottom.

What is the current behavior?

In IE10-11 footer is not sticky at bottom. When adding height 100% to site, then Chrome will squeeze the content block so that everything will fit. Fix on, break the other and vice versa.

Metadata

Metadata

Labels

P1Urgent issue that should be resolved before the next re-leasebughas prA PR has been created to address this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions