Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

100% height on body element causing issues #681

Closed

Description

@jasedwards

I am using bootstrap and I have set one of my row elements to be 500 px. I have content above and below this as well. when the page renders I get the top half gray (my body background-color) and the bottom white. I went in to dev tools to take a look and the issue is that the body is not resizing. when I get rid of height:100% that is set on body element in angular-material.css then the issue is fixed.

Activity

  1. changed the title [-]100% height on body tag causing issues[/-] [+]100% height on body element causing issues[/+] on Nov 18, 2014
  2. added this to the milestone on Nov 18, 2014
  3. adamduren commented on Jan 22, 2015

    @adamduren

    I am experiencing this issue as well. @jasedwards Any update on this issue?

  4. adamduren commented on Jan 22, 2015

    @adamduren

    What is the intention of setting height: 100%; in angular-material.css?

    I was about to work around the issue with html, body { min-height: 100%; } in my own css file.

  5. jasedwards commented on Jan 26, 2015

    @jasedwards
    Author

    I fixed it by adding this to my css body {min-height:100%; height:auto;}

  6. ggranum commented on Feb 5, 2015

    @ggranum

    The 100% height on the body element is also the cause of the address bar failing to hide on scroll on (at least) Android+Chrome.

    edit: Confirmed same behaviour on iOS+Chrome and iOS+Safari.

  7. modified the milestones: , on Feb 6, 2015
  8. rschmukler commented on Feb 7, 2015

    @rschmukler
    Contributor

    The intention is to keep the body height fixed so that an inner md-content is what scrolls. This makes it so that things like sticky work correctly. It is worth exploring whether we can do something better...

  9. modified the milestones: 0.9.0, on Feb 7, 2015
  10. ggranum commented on Feb 8, 2015

    @ggranum

    @rschmukler Thanks. Unfortunately I'm sure that you've realized by now (perhaps accompanied by a bit of sinking feeling) that even if there isn't something better overall we still won't be able to use 100% height on body. Here's my reasoning:

    • The failure to hide the address bar on mobile is a complete non-starter for real world use.
    • Even if mobile browsers are updated to 'fix' the address bar issue it won't help those older mobile devices that have the most restricted screen real estate. Also, that's a years-long adoption cycle.
    • The longer this issue is set aside, the more internal development is made assuming a static height on body: so, more bugs and more pain later. Unless we're really lucky and there is a simple universal hack.

    I hope that the team chooses to rip off this bandaid as soon as possible. The number and variety of fixes that are likely to be introduced to fix this in the wild are likely to lead to more developer pain the longer the current behaviour is maintained. It will also lend to more bugs filed later as consuming devs and teams 'forget' which of their styles only exist to work around this issue.

    Thanks again - and of course, thanks for all the hard work.

  11. 50 remaining items

  12. ThomasBurleson commented on Dec 2, 2015

    @ThomasBurleson
    Contributor

    @ggranum - thx for the feedback. I will escalate a discussion with the team today.

  13. modified the milestones: 1.0-rc6, 1.0-rc7 on Dec 3, 2015
  14. ThomasBurleson commented on Dec 4, 2015

    @ThomasBurleson
    Contributor

    Getting Started and Layout documentation improvements are coming with PR #6082

  15. added
    pr: merge readyThis PR is ready for a caretaker to review
    and removed
    needs: team discussionThis issue requires a decision from the team before moving forward.
    on Dec 4, 2015
  16. ThomasBurleson commented on Dec 4, 2015

    @ThomasBurleson
    Contributor

    Closed with SHA f6e97a0

  17. Araknos commented on Dec 20, 2020

    @Araknos

    Is this supposed to be resolved ? I still have the issue using Angular 9.

  18. Splaktar commented on Dec 21, 2020

    @Splaktar
    Contributor

    @Araknos Please submit Angular Material and CDK questions here and issues here. This repo is for AngularJS Material.

  19. locked as resolved and limited conversation to collaborators on Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions