🐛 fix issue w/ responsiveness due to media querie

device-width is deprecated and only works in chrome it seems. reworked to use regular min/max-width queries for both scss & react-responsive. submitted a ticket to react-responsive to fix
This commit is contained in:
Jeff Reiner 2019-01-03 10:04:27 +01:00
parent df3f8e98ed
commit b96db4ef96
10 changed files with 14 additions and 13 deletions

@ -28,7 +28,7 @@
border-top-right-radius: 1rem; border-top-right-radius: 1rem;
transition: 250ms ease-in-out; transition: 250ms ease-in-out;
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
max-width: 560px; max-width: 560px;
position: absolute; position: absolute;
margin-left: auto; margin-left: auto;

@ -254,7 +254,7 @@
font-weight: 200; font-weight: 200;
} }
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
max-width: 560px; max-width: 560px;
max-height: 768px; max-height: 768px;
position: absolute; position: absolute;

@ -68,7 +68,7 @@
} }
} }
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
//position: fixed; //position: fixed;
top: 0px; top: 0px;
left: 0px; left: 0px;

@ -22,7 +22,7 @@ html, body {
background-color: $white; background-color: $white;
z-index: 100; z-index: 100;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }

@ -40,7 +40,7 @@ class App extends Component {
return ( return (
<div id="app-container"> <div id="app-container">
<MediaQuery query="(min-device-width: 768px)"> <MediaQuery query="(min-width: 768px)">
<Header /> <Header />
</MediaQuery> </MediaQuery>
<Web3Connect /> <Web3Connect />

@ -5,9 +5,10 @@
height: 100%; height: 100%;
position: relative; position: relative;
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
margin: auto; margin: auto;
width: 560px; max-width: 560px;
width: 100%;
} }
& > div { & > div {
@ -25,7 +26,7 @@
height: 100vh; height: 100vh;
@extend %col-nowrap; @extend %col-nowrap;
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
//max-width: 560px; //max-width: 560px;
} }
} }

@ -16,7 +16,7 @@ class Pool extends Component {
render() { render() {
return ( return (
<div className="pool"> <div className="pool">
<MediaQuery query="(max-device-width: 768px)"> <MediaQuery query="(max-width: 768px)">
<Header /> <Header />
</MediaQuery> </MediaQuery>
<Switch> <Switch>

@ -92,7 +92,7 @@
border-top-right-radius: 1rem; border-top-right-radius: 1rem;
transition: 250ms ease-in-out; transition: 250ms ease-in-out;
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
max-width: 560px; max-width: 560px;
position: absolute; position: absolute;
margin-left: auto; margin-left: auto;
@ -130,7 +130,7 @@
transition: 250ms ease-in-out; transition: 250ms ease-in-out;
padding: 1rem 0 .5rem; padding: 1rem 0 .5rem;
@media only screen and (min-device-width : 768px) { @media only screen and (min-width : 768px) {
max-width: 560px; max-width: 560px;
position: absolute; position: absolute;
margin-left: auto; margin-left: auto;

@ -719,7 +719,7 @@ class Send extends Component {
return ( return (
<div className="send"> <div className="send">
<MediaQuery query="(max-device-width: 767px)"> <MediaQuery query="(max-width: 767px)">
<Header /> <Header />
</MediaQuery> </MediaQuery>
<div <div

@ -701,7 +701,7 @@ class Swap extends Component {
return ( return (
<div className="swap"> <div className="swap">
<MediaQuery query="(max-device-width: 767px)"> <MediaQuery query="(max-width: 767px)">
<Header /> <Header />
</MediaQuery> </MediaQuery>
<div <div