-
Notifications
You must be signed in to change notification settings - Fork 3.4k
CSS; height as inherit leads to layout issues (Chrome / IE11) #4397
Comments
+1 broke my layouts. My navbar is now 50% of the page |
+1 |
@Londovir If you add @robertbaker @icchio Can you guys add some demos of your specific cases so that we can see the best way to fix it? The |
@topherfangio I've updated my CodePen from the original link to show the icon issue. You can disregard the However, I've shown another layout issue this change has made. If you look at my CodePen and examine the right panel, there is a red line of text which should be just beneath the So, in this case, trying to use |
@Londovir The main issue we were attempting to solve is #4022. In this case, devs were having the opposite problem in that they had to add height hacks to every ancestor of a nested component to get the column layout working properly. If you change it from |
Just talked with the team, we are trying to push 0.11 out this morning, so we're going to go ahead and revert this change since it is causing more issues than expected and we will reach out to users to try to find a better fix. Revert should be pushed momentarily. |
Understood & appreciated. FWIW, it seems like the |
Originally, it seemed that adding the `height: initial` made no significant change to the layout system except to fix #4022, however, multiple users have experienced major issues with their layouts: #4397. We are reverting so that we can take some more time to work with the community to find a better fix. Reverts commit 303ab0d
Originally, it seemed that adding the `height: initial` made no significant change to the layout system except to fix angular#4022, however, multiple users have experienced major issues with their layouts: angular#4397. We are reverting so that we can take some more time to work with the community to find a better fix. Reverts commit 303ab0d
Ever since the recent commit of code a few days ago that caused
height : inherit
to be bound to the.layout
class, I've been struggling with layout issues. For instance, the following simple layout causes unnecessary scrolling in Chrome and IE11:See this CodePen: Example
If I use F12 tools, and disable the
height : inherit
, all returns to normal as expected.I'm not sure if this is as expected/designed and I'm just not designing properly, or if this is an unintended consequence. For instance, I understand in the example above that the
div
will inherit the height of thebody
, which the MD CSS gives a 100% height and min-height. So, in this case, this causes an unnecessary scrolling since the height of themd-toolbar
is not being subtracted from the page height, and thediv
therefore runs longer than the viewport by that much. I can use more involved flex layouts and designs to account for this, but that leads to other issues.One such issue is when I use
md-icon
. I've seen cases where anmd-icon
that is nested into some combinations oflayout="row"
orlayout="column"
loses the height of 24px set in the MD CSS because the.layout
inherit style overrides it.The text was updated successfully, but these errors were encountered: