Skip to content

Commit

Permalink
feat(responsive): ensure popover fits in small devices viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
jyounce committed Feb 23, 2019
1 parent 70eb32f commit 2241fcb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/styles/layout/popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.popover {
position: absolute;
z-index: 1060;
max-width: 276px; // TODO: make responsive, 255px fits iphone
max-width: 276px;
width: -moz-max-content; // firefox
width: max-content;
cursor: auto;
Expand Down
15 changes: 15 additions & 0 deletions src/client/styles/layout/responsive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*********************
* RESPONSIVE LAYOUTS
*********************/
// extra small screens (includes iphone portrait)
@media (max-width: 375px) {
.popover {
max-width: 245px;
}
}
// small screens (includes iphone plus portrait)
@media (min-width: 376px) and (max-width: 414px) {
.popover {
max-width: 255px;
}
}
4 changes: 4 additions & 0 deletions src/client/styles/rb-popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@import 'layout/pointer.scss';
@import 'layout/popover.scss';

/* Responsive Layout
********************/
@import 'layout/responsive.scss';

/* CSS Style Variables
**********************/
@import 'variables/common.scss';
Expand Down

0 comments on commit 2241fcb

Please sign in to comment.