#182: fix body disposition due to scrollbar on small screens. Fix popup layout on mobile devices

This commit is contained in:
SleepWalker 2016-10-09 20:54:35 +03:00
parent 7b41ca5c4d
commit 666f5f218a
5 changed files with 8 additions and 18 deletions

View File

@ -46,9 +46,9 @@ $popupMargin: 20px; // Отступ попапа от краёв окна
} }
.popupWrapper { .popupWrapper {
box-sizing: content-box; box-sizing: border-box;
margin: $popupMargin auto; margin: 0 auto;
padding: 0 $popupMargin; padding: $popupMargin;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@ -143,6 +143,7 @@ $popupInitPosition: translateY(10%) rotateX(-8deg);
.trLeave { .trLeave {
opacity: 1; opacity: 1;
overflow: hidden;
.popup { .popup {
opacity: 1; opacity: 1;

View File

@ -14,7 +14,6 @@ body {
background: $light; background: $light;
color: #444; color: #444;
font-size: 16px; font-size: 16px;
overflow: hidden;
} }
b { b {

View File

@ -1,8 +1,4 @@
.container { .container {
min-height: 100%;
position: relative;
box-sizing: border-box;
padding: 55px 10px 65px; // 65px for footer padding: 55px 10px 65px; // 65px for footer
} }

View File

@ -22,6 +22,8 @@ if (process.env.NODE_ENV === 'production') {
function RootPage(props) { function RootPage(props) {
const isRegisterPage = props.location.pathname === '/register'; const isRegisterPage = props.location.pathname === '/register';
document.body.style.overflow = props.isPopupActive ? 'hidden' : '';
return ( return (
<div className={styles.root}> <div className={styles.root}>
<div id="view-port" className={classNames(styles.viewPort, { <div id="view-port" className={classNames(styles.viewPort, {

View File

@ -5,19 +5,15 @@ $userBarHeight: 50px;
.root { .root {
height: 100%; height: 100%;
overflow: hidden;
} }
.viewPort { .viewPort {
height: 100%; height: 100%;
overflow-y: auto;
overflow-x: hidden;
} }
.isPopupActive { .isPopupActive {
filter: blur(5px); filter: blur(5px);
transition: filter 0.4s 0.1s ease; transition: filter 0.4s 0.1s ease;
overflow: hidden;
} }
.wrapper { .wrapper {
@ -55,14 +51,10 @@ $userBarHeight: 50px;
composes: wrapper; composes: wrapper;
position: relative; position: relative;
// place for header
min-height: 100%; min-height: 100%;
// hack to enable min-height/height 100% in parent elements
// http://stackoverflow.com/a/21836870/2039203
// http://stackoverflow.com/questions/2341821/height100-vs-min-height100
height: 0;
box-sizing: border-box; box-sizing: border-box;
padding-top: $userBarHeight;
padding-top: $userBarHeight; // place for header
} }
.userbar { .userbar {