Skip to content

Commit fa88118

Browse files
authoredJun 6, 2021
fix: guides overlapping footer on narrow screens (#1007)
Fixes that the guide tiles can overlap the footer on smaller screens. Fixes https://github.com/angular/components/issues/22860.
1 parent d9861d4 commit fa88118

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed
 

‎material.angular.io/src/app/pages/guide-list/guide-list.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
:host,
22
.docs-guide {
3-
height: 100%;
3+
// Ensures that the footer is pushed to the bottom if the page is too short.
4+
display: flex;
5+
flex-direction: column;
6+
flex-grow: 1;
47
}
58

69
.docs-guide-list {

‎material.angular.io/src/app/pages/guide-list/guide-list.spec.ts

-19
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,4 @@ describe('GuideList', () => {
2727
.length;
2828
expect(totalLinks).toEqual(totalItems);
2929
});
30-
31-
it('should set the footer below the bottom of the given view', () => {
32-
const viewHeight = 1200;
33-
const prevHeight = fixture.debugElement.styles['height'];
34-
fixture.debugElement.styles['height'] = `${viewHeight}px`;
35-
fixture.detectChanges();
36-
37-
const footer = fixture.nativeElement.querySelector('app-footer');
38-
const main = fixture.nativeElement.querySelector('main');
39-
40-
expect(main.getBoundingClientRect().height)
41-
.withContext('main content should take up the full given height')
42-
.toBe(viewHeight);
43-
expect(main.getBoundingClientRect().height + footer.getBoundingClientRect().height)
44-
.withContext('footer should overflow allowed viewport')
45-
.toBe(viewHeight + footer.getBoundingClientRect().height);
46-
47-
fixture.debugElement.styles['height'] = prevHeight;
48-
});
4930
});

0 commit comments

Comments
 (0)
Please sign in to comment.