Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Responsive Design, Footers bottom of screen on mobile devices #… #15471

Closed
wants to merge 4 commits into from
Closed

Fixed Responsive Design, Footers bottom of screen on mobile devices #… #15471

wants to merge 4 commits into from

Conversation

chirag-wagento
Copy link
Contributor

…15118

Fix footer responsive issue

Description

Fixed Issues (if relevant)

  1. Responsive Design, Footers do not snap to bottom of screen on mobile devices #15118:
    Responsive Design, Footers do not snap to bottom of screen on mobile devices

Manual testing scenarios

  1. Check responsive footer

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@@ -363,6 +363,21 @@
// _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
html,
body {
height: 100%; // Stretch screen area for sticky footer
Copy link
Contributor

Choose a reason for hiding this comment

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

Use height: 100% is a bad practice because content can be more than 100% and in this case, body block will not adaptive to content, it will be always 100% independent to content, that's is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@VladimirZaets
I have checked with content and without content page I don't see any issue .

Can you see attached image.
If still you have any query then you attach issue screen shot. I will try to solve
with-content
without-content png

Copy link
Contributor

Choose a reason for hiding this comment

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

But in Safari and other browsers and cases. 'min-height: 100%` should be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DanielRuf
I have checked with 'min-height'.
If i will use 'min-height' then I can see some responsive issue. You can see attached
One more important thing there are use 'height: 100%' for desktop view.
I have checked in chrome, firefox and safari.

Right now I can't see any issue If you can see any isseu then please atteched screen short.
I will check it

mini-h

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

If i will use 'min-height' then I can see some responsive issue.

Please elaborate what issue you see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After add 'min-height:100% you can see issue in screenshot ' footer is not touch in bottom.

Copy link
Contributor

@DanielRuf DanielRuf left a comment

Choose a reason for hiding this comment

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

Please use min-height:100%

@VladimirZaets
Copy link
Contributor

@chirag-wagento Visually, it looks fine, but if you open browser developer tools and look to HTML, you will see that body is overflowed by inside content. If you add overflow: hidden to the body tag, you will see that the page will not be never scrollable.

As @DanielRuf said, please use min-height:100%

@chirag-wagento
Copy link
Contributor Author

@VladimirZaets @DanielRuf

'min-height: 100%' is not working as I have mentioned in my above comment with screenshot.

If I will use Overflow:hidden in mobile view can't scroll down to show content.
Could you please check once and share with me screenshot if any issues.

screenshot--2018-05-29-15-04-09

@VladimirZaets
Copy link
Contributor

@chirag-wagento Exactly, this means that something went wrong in your design. All page content should be inside the body and body should be adaptive to content that is inside it.

Also, I don't fully understand the problem with min-height:100, the screenshots look the same. Can you please provide more details?

@chirag-wagento
Copy link
Contributor Author

@VladimirZaets I have checked with min-height:100% OR height: 100%. You can see difference in screen shot if I will use min-height then footer can'n touch in bottom.

min-height: 100% screenshot
mini-h

height: 100% screenshot
without-content png

I have used same css which one used in desktop view. I have just copy css in mobile view. I have tested whole site and it's working fine with height:100%. could you please test once from your side.

@DanielRuf
Copy link
Contributor

DanielRuf commented May 30, 2018

Then the flex grow is not set correctly.

See https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/

https://dev.to/domysee/keeping-the-footer-at-the-bottom-with-css-flexbox-5h5f

flex-direction column, grow and min-height (either 100% or 100vh).

@chirag-wagento
Copy link
Contributor Author

@VladimirZaets

Any update in this PR?

Thanks

@orlangur
Copy link
Contributor

@chirag-wagento you still did not get rid of height: 100%;.

@chirag-wagento
Copy link
Contributor Author

@orlangur I was try with height.
But it is some responsive issue in mobile view you can see my above this comment. #15471 (comment)
There are currently no any issue you can check my coding.

Thanks

@VladimirZaets
Copy link
Contributor

@chirag-wagento I don't see a difference in the linked screenshots.
If use height 100% the body container will be less than content inside it. It's wrong according to Hypertext Markup Language.

There is example with height:100%:
body is marked by blue color
screen shot 2018-06-21 at 15 40 21

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

Successfully merging this pull request may close these issues.

4 participants