1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Merge pull request #11976 from MetaMask/break-point-overhaul

Using design system breakpoint values across ui/
This commit is contained in:
ryanml 2021-09-15 10:41:05 -07:00 committed by GitHub
commit 7895fcb7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 117 additions and 117 deletions

View File

@ -9,11 +9,11 @@
min-width: 150px;
color: $white;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
right: calc(((100vw - 100%) / 2) + 8px);
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
right: calc((100vw - 85vw) / 2);
}
@ -33,7 +33,7 @@
position: relative;
z-index: 201;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 14px;
}
@ -133,7 +133,7 @@
display: none;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
max-height: 228px;
}
@ -168,7 +168,7 @@
padding: 16px 14px;
flex: 0 0 auto;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 12px 14px;
}

View File

@ -8,12 +8,12 @@
width: 100%;
flex: 0 0 auto;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 1rem;
z-index: $mobile-header-z-index;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
height: 75px;
justify-content: center;
@ -50,11 +50,11 @@
flex-flow: row nowrap;
width: 100%;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
height: 100%;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 85vw;
}

View File

@ -57,7 +57,7 @@
padding-bottom: 0;
}
@media (min-width: 576px) {
@media (min-width: $break-large) {
&__warning-tooltip {
display: none;
}

View File

@ -1,6 +1,6 @@
.edit-gas-popover {
&__wrapper {
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
max-height: 84vh;
}
}

View File

@ -18,7 +18,7 @@
justify-content: space-between;
align-items: center;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
@include H8;
}

View File

@ -93,7 +93,7 @@
padding-bottom: 2px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H8;
}
}
@ -103,7 +103,7 @@
padding-bottom: 2px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H8;
}
}

View File

@ -8,7 +8,7 @@
min-height: 116px;
padding: 16px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
min-width: 472px;
}
@ -44,7 +44,7 @@
flex-direction: row;
align-items: center;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 160px;
}
}
@ -78,7 +78,7 @@
width: 155px;
padding: 0;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 135px;
}
@ -103,7 +103,7 @@
padding: 0;
margin-left: 4px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 135px;
}

View File

@ -8,7 +8,7 @@
flex-flow: column;
border-radius: 8px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
max-height: 450px;
}
@ -17,7 +17,7 @@
flex: 1;
padding: 16px 32px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
justify-content: center;
padding: 28px 20px;
}

View File

@ -48,7 +48,7 @@
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
&__name {
width: 90px;
}

View File

@ -46,7 +46,7 @@
flex: 1;
align-items: center;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
height: 0;
}
}
@ -71,7 +71,7 @@
padding: 30px 0 20px;
min-height: 170px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
min-height: 270px;
flex-flow: column;
justify-content: flex-start;
@ -89,11 +89,11 @@
flex: 0 0 auto;
padding: 0 20px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 12rem;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 100%;
max-height: 6rem;
padding-bottom: 20px;
@ -109,7 +109,7 @@
padding-bottom: 20px;
align-self: flex-start;
@media screen and (min-width: 575px) {
@media screen and (min-width: $break-large) {
width: 15rem;
}
@ -128,7 +128,7 @@
display: flex;
justify-content: flex-end;
@media screen and (min-width: 575px) {
@media screen and (min-width: $break-large) {
min-width: 300px;
}
}

View File

@ -5,7 +5,7 @@
margin-right: 0%;
max-height: 75vh;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
max-height: 100vh;
}
}
@ -20,7 +20,7 @@
}
.metametrics-opt-in__footer {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
margin-top: 10px;
justify-content: center;
margin-left: 2%;

View File

@ -8,7 +8,7 @@
right: 0;
margin: 8px;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
width: 340px;
}

View File

@ -10,7 +10,7 @@
justify-content: space-between;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 426px;
flex: 1;
@ -101,7 +101,7 @@
align-items: center;
margin-top: 12px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
border-top: none;
}
@ -115,7 +115,7 @@
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
&__title {
position: initial;
}

View File

@ -8,7 +8,7 @@
flex-direction: column;
min-width: 0;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
flex: initial;
}
}

View File

@ -30,7 +30,7 @@
padding-left: 12px;
padding-right: 12px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: auto;
}
}

View File

@ -19,7 +19,7 @@
background-color: unset;
text-align: start;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
&:hover {
opacity: 0.4;
}
@ -29,7 +29,7 @@
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H4;
padding: 24px;
@ -44,7 +44,7 @@
&__description {
display: none;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H6;
display: block;
@ -58,7 +58,7 @@
&__caret {
display: none;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: block;
background-image: url('/images/caret-right.svg');
width: 36px;

View File

@ -76,12 +76,12 @@
}
.popover-wrap.whats-new-popup__popover {
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
max-height: 600px;
width: 500px;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
max-height: 568px;
}
}

View File

@ -97,13 +97,13 @@
white-space: nowrap;
}
@media (max-width: 575px) {
@media (max-width: $break-small) {
&__mid-content {
display: none;
}
}
@media (min-width: 576px) {
@media (min-width: $break-large) {
grid-template-areas:
'icon head head head head mid mid mid mid right right right'
'icon sub sub sub sub mid mid mid mid right right right'
@ -115,7 +115,7 @@
grid-template-areas: 'icon head head head head head head head right right right right';
align-items: center;
@media (min-width: 576px) {
@media (min-width: $break-large) {
grid-template-areas: 'icon head head head head mid mid mid mid right right right';
}
}

View File

@ -184,7 +184,7 @@
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
.page-container {
height: 100%;
width: 100%;
@ -195,7 +195,7 @@
}
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
.page-container {
max-height: 82vh;
min-height: 570px;

View File

@ -57,7 +57,7 @@
margin: 0 14px;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
right: calc(((100% - 85vw) / 2) + 2px);
}

View File

@ -50,7 +50,7 @@ $sub-mid-size-breakpoint-range: "screen and (min-width: #{$break-large}) and (ma
// main-container media queries
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
.lap-visible {
display: flex;
}
@ -83,7 +83,7 @@ $sub-mid-size-breakpoint-range: "screen and (min-width: #{$break-large}) and (ma
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
.lap-visible {
display: none;
}
@ -117,11 +117,11 @@ $sub-mid-size-breakpoint-range: "screen and (min-width: #{$break-large}) and (ma
flex-direction: row-reverse;
justify-content: space-between;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
height: 100%;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 85vw;
}

View File

@ -1,6 +1,6 @@
// Checks if viewport at invoke time fits mobile dimensions
// isMobileView :: () => Bool
const isMobileView = () =>
window.matchMedia('screen and (max-width: 575px)').matches;
window.matchMedia('screen and (max-width: $break-small)').matches;
export default isMobileView;

View File

@ -14,7 +14,7 @@
display: none;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
position: absolute;
}

View File

@ -13,7 +13,7 @@
margin-right: 28%;
color: black;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
justify-content: center;
margin-left: 2%;
margin-right: 0%;
@ -103,7 +103,7 @@
&__footer {
margin-top: 26px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
margin-top: 10px;
justify-content: center;
margin-left: 2%;

View File

@ -4,7 +4,7 @@
}
&__sorted-seed-words {
max-width: 575px;
max-width: $break-small;
}
&__seed-word {
@ -57,7 +57,7 @@
color: transparent;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H6;
padding: 6px 18px;
@ -70,7 +70,7 @@
display: flex;
flex-flow: row wrap;
min-height: 161px;
max-width: 575px;
max-width: $break-small;
border: 1px solid #cdcdcd;
border-radius: 6px;
background-color: $white;

View File

@ -1,5 +1,5 @@
.reveal-seed-phrase {
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
display: flex;
flex-direction: column;
width: 96%;

View File

@ -38,7 +38,7 @@
color: $primary-1;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
font-size: 0.9rem;
}
}

View File

@ -16,7 +16,7 @@
margin-top: 8px;
opacity: 0.5;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 60%;
}
}

View File

@ -33,7 +33,7 @@
}
}
@media only screen and (max-width: 575px) {
@media only screen and (max-width: $break-small) {
.import-account {
margin: 24px;
display: flex;
@ -68,7 +68,7 @@
}
}
@media only screen and (max-width: 575px) {
@media only screen and (max-width: $break-small) {
.import-account__input {
width: 100%;
}

View File

@ -18,7 +18,7 @@
color: $Grey-300;
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 426px;
}
@ -155,7 +155,7 @@
flex-direction: column;
justify-content: flex-end;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
flex-direction: column-reverse;
justify-content: space-between;
padding-bottom: 20px;
@ -171,7 +171,7 @@
margin-top: 8px;
border-top: 1px solid #d6d9dc;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
border-top: none;
}

View File

@ -9,7 +9,7 @@
display: flex;
flex-direction: column;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
.page-container {
max-height: none;
min-height: auto;

View File

@ -7,7 +7,7 @@
.address-book {
flex: 0.4 1 100%;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
flex: 1;
max-width: 100%;
@ -259,7 +259,7 @@
width: auto;
border-radius: 100px;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
top: 16px;
right: 60px;
@ -277,7 +277,7 @@
.address-book-contact-content {
flex: 0.4 1 100%;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
flex: 1;
}
}

View File

@ -43,7 +43,7 @@
display: flex;
flex-flow: row nowrap;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: none;
}
}
@ -70,7 +70,7 @@
align-items: center;
padding: 16px 0;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
height: 69px;
position: relative;
text-align: center;
@ -80,7 +80,7 @@
&__sub-header-text {
@include H4;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
@include H5;
width: 100%;
@ -90,7 +90,7 @@
&__back-button {
display: none;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: block;
background-image: url('/images/caret-left-black.svg');
width: 18px;
@ -127,14 +127,14 @@
flex-direction: column;
flex: 1 1 auto;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
flex: 0 0 40%;
max-width: 210px;
padding-top: 8px;
}
.tab-bar__tab {
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
padding: 16px 24px 0;
}
}
@ -146,7 +146,7 @@
display: flex;
flex-flow: column;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: none;
}
}
@ -155,7 +155,7 @@
&__body {
padding: 12px 24px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
padding: 12px;
}
}
@ -173,7 +173,7 @@
flex-direction: column;
margin-bottom: 20px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
height: initial;
padding: 5px 0;
}
@ -204,7 +204,7 @@
display: flex;
flex-direction: column;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
max-width: 100%;
width: 100%;
}
@ -233,13 +233,13 @@
.settings-page {
&__content {
&__tabs {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: none;
}
}
&__modules {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: block;
}
}

View File

@ -19,7 +19,7 @@
&__link-header {
padding-bottom: 15px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding-bottom: 5px;
}
}
@ -32,7 +32,7 @@
&__link-item {
padding: 15px 0;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 5px 0;
}
}

View File

@ -6,7 +6,7 @@
max-width: 739px;
justify-content: space-between;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
margin-top: 0;
flex-direction: column;
overflow-x: hidden;
@ -20,7 +20,7 @@
display: flex;
flex-direction: column;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 0;
}
}
@ -36,7 +36,7 @@
.page-container__footer {
border-top: none;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 93%;
}
@ -45,7 +45,7 @@
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: flex;
flex: auto;
max-width: 100%;
@ -57,7 +57,7 @@
}
&__network-form-row {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 93%;
}
@ -71,7 +71,7 @@
padding: 12px;
margin: 12px 0;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 93%;
}
}
@ -98,7 +98,7 @@
flex: 0.5 0 auto;
max-width: 343px;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
flex: 1;
overflow-y: auto;
max-width: 100vw;
@ -127,13 +127,13 @@
padding: 10px;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: none;
}
}
&__networks-list--selection {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: none;
}
}
@ -149,12 +149,12 @@
cursor: pointer;
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
margin: 0 4px 0 10px;
}
}
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
padding: 20px 23px 21px 17px;
border-bottom: 1px solid #d8d8d8;
max-width: 351px;
@ -162,7 +162,7 @@
}
&__networks-list-item:last-of-type {
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
border-bottom: none;
}
}
@ -190,7 +190,7 @@
&__networks-list-arrow {
display: none;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
display: block;
background-image: url('/images/caret-right.svg');
width: 24px;
@ -228,7 +228,7 @@
flex-flow: row nowrap;
padding: 0.75rem 0;
@media screen and (max-width: 575px) {
@media screen and (max-width: $break-small) {
width: 93%;
}

View File

@ -133,7 +133,7 @@
&__open-to-dropdown {
max-height: 194px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
max-height: 276px;
}
}

View File

@ -5,7 +5,7 @@
display: flex;
justify-content: center;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
margin: 0;
}

View File

@ -20,7 +20,7 @@
justify-content: center;
width: 100%;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
z-index: 12;
}
@ -33,7 +33,7 @@
overflow-x: hidden;
overflow-y: auto;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 460px;
background: white;
border: 1px solid $Grey-100;
@ -51,13 +51,13 @@
width: 100%;
height: 100%;
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
&--overflow {
overflow: scroll;
}
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 348px;
}
}
@ -81,7 +81,7 @@
width: 100%;
position: relative;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
padding-top: 8px;
padding-bottom: 8px;
height: 66px;

View File

@ -10,7 +10,7 @@
&__popover-wrap {
height: 100%;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
height: 620px;
width: 348px;
}
@ -32,7 +32,7 @@
background: $Grey-100;
opacity: 1;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
opacity: 0.5;
}
}

View File

@ -9,7 +9,7 @@
}
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
&--border {
.swaps-footer__custom-page-container-footer-class {
border-top: 1px solid #d2d8dd;
@ -20,7 +20,7 @@
&__custom-page-container-footer-class {
border-top: none;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
height: 96px;
}
}
@ -44,13 +44,13 @@
display: flex;
justify-content: center;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
margin-top: 0;
}
}
&__buttons {
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
&--border {
.swaps-footer__custom-page-container-footer-class {
border-top: 1px solid #d2d8dd;

View File

@ -20,13 +20,13 @@
pointer-events: none;
}
@media screen and (max-width: 576px) {
@media screen and (max-width: $break-small) {
overflow-y: auto;
max-height: 420px;
}
}
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
width: 348px;
}
@ -68,7 +68,7 @@
background: linear-gradient(90deg, $Blue-500 0%, $Blue-400 101.32%);
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
@include H6;
margin-bottom: 0;
@ -171,7 +171,7 @@
margin-top: 8px;
margin-bottom: 28px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
&--thin {
min-height: 36px;
}
@ -201,7 +201,7 @@
max-width: 311px;
margin-bottom: 8px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
margin-bottom: 0;
}
}
@ -223,7 +223,7 @@
&__thin-swaps-footer {
max-height: 82px;
@media screen and (min-width: 576px) {
@media screen and (min-width: $break-large) {
height: 72px;
}
}