Skip to content

Implement sticky footer using flexbox#637

Merged
yangshun merged 3 commits intofacebook:masterfrom
ahmadalfy:master
May 6, 2018
Merged

Implement sticky footer using flexbox#637
yangshun merged 3 commits intofacebook:masterfrom
ahmadalfy:master

Conversation

@ahmadalfy
Copy link
Contributor

Implemented the solution provided here to allow the footer to stick downward no matter how much content the page contain.

Motivation

Have a footer hanging above with a space below when not enough content is added is something that bothers everyone. Implementing that behavior on desktop is simple and progressively enhance the look of the website on new browsers.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

This is a UI change affecting only the main stylesheet. I have tested the solution on the latest versions of the modern browsers (Firefox, Chrome, Safari, Edge) and IE11

Before:
before

After:
after

Notes

There were actually 2 issues when I was implementing that behavior:

  1. The lack of stylesheet methodology to be followed. I have added my modifications to the end of the file.
  2. For some reason I found that box-sizing is following the browser's default and I am not sure if it is a good idea or not. People usually change it to border-box to easily calculate the dimensions of the boxes. I had to implement it on a certain block to overcome the collapse being applied to the box caused by the margin: 0 auto and display: flex.

ahmadalfy added 2 commits May 6, 2018 01:17
Implemented the solution provided [here](https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/) to allow the footer to stick downward no matter how much content the page contain.
Implement sticky footer using flexbox
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 5, 2018
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented May 5, 2018

Deploy preview for docusaurus-preview ready!

Built with commit aa21e00

https://deploy-preview-637--docusaurus-preview.netlify.com

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ahmadalfy! This is great! I fully agree with your points. The CSS could really use some improvement. I have plans to rewrite the entire CSS along with making it easier to support theming.

@yangshun yangshun merged commit b220ec2 into facebook:master May 6, 2018
@ahmadalfy
Copy link
Contributor Author

ahmadalfy commented May 6, 2018

Thank you I would like to contribute to that as well. I have experience working with CSS following different methodologies like ITCSS and BEM and working with pre-and post processors For big projects that gives room for theming. Please let me know if you have any plans existing for that and thank you for accepting my PR.

@JoelMarcey
Copy link
Contributor

@ahmadalfy @yangshun Have folks passionate and knowledge about UX work on this makes me so happy. Thanks! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants