Skip to content

Commit

Permalink
fix(grid-list): only position grid item first-child (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmichalina authored Jun 25, 2019
1 parent f66bdd2 commit 463528f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@
position: relative;
color: white;

::ng-deep :first-child {
::ng-deep > :first-child, ::ng-deep > video {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
::ng-deep video {
max-width: 100%;
object-fit: cover;
display: flex;
align-items: center;
justify-content: center;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ describe(FloGridListViewComponent.name, () => {
})

it('should get native when orientation is landscape', () => {
const sut = createSut().instance;
const sut = createSut().instance
const { width, height } = (<any>window).screen;
(<any>window).screen = { width: 300, height: 400 }
expect(window.screen.height).toEqual(400)
expect(window.screen.width).toEqual(300)
expect(sut.getNativeAspectRatio()).toEqual(`${window.screen.width / window.screen.height * 100}%`)
expect(sut.getNativeAspectRatio()).toEqual(`${window.screen.width / window.screen.height * 100}%`);
(<any>window).screen = { width, height } // reset window object
})

it('should run change detection on fullscreen change', () => {
Expand Down

0 comments on commit 463528f

Please sign in to comment.