Skip to content

Commit

Permalink
feat: Use mobile layout for mobile devices in landscape orientation
Browse files Browse the repository at this point in the history
Viewports less than or equal to 900px in width that have a minimum 
aspect ratio of 16:9 will use the mobile layout.
  • Loading branch information
nathanbuchar committed Feb 25, 2019
1 parent d75f581 commit 7f736a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sass/mixins.scss
@@ -1,5 +1,9 @@
@mixin mobile {
@media screen and (max-width: 767px) {
// Viewport width is less than 768px (iPad portrait), or
// the viewport is 900px wide but has an aspect ratio of
// 16:9 (like an iPhone in landscape).
@media only screen and (max-width: 767px),
only screen and (max-width: 900px) and (min-aspect-ratio: 16/9) {
@content;
}
}

0 comments on commit 7f736a8

Please sign in to comment.