-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: removing unused css #30214
chore: removing unused css #30214
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
await driver.assertElementNotPresent('.send-v2__error-amount', { | ||
waitAtLeastGuard: 100, // A waitAtLeastGuard of 100ms is the best choice here | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@import './network'; | ||
@import './newui-sections'; | ||
@import './send'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing deleted file imports
@@ -1,195 +0,0 @@ | |||
@use "design-system"; | |||
|
|||
.network-component--disabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-component.pointer { | ||
border: 1px solid var(--color-border-muted); | ||
border-radius: 82px; | ||
padding: 6px 3px; | ||
flex: 0 0 auto; | ||
display: flex; | ||
|
||
&.ethereum-network .menu-icon-circle div { | ||
background-color: rgba(3, 135, 137, 0.7) !important; | ||
} | ||
|
||
&.goerli-test-network .menu-icon-circle div { | ||
background-color: rgba(48, 153, 242, 0.7) !important; | ||
} | ||
|
||
&.sepolia-test-network .menu-icon-circle div { | ||
background-color: rgba(207, 181, 240, 0.7) !important; | ||
} | ||
|
||
&.linea-test-network .menu-icon-circle div { | ||
background-color: rgba(0, 0, 0, 0.7) !important; | ||
} | ||
|
||
&.localhost-network .menu-icon-circle div { | ||
background-color: rgba(3, 135, 137, 0.7) !important; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.dropdown-menu-item { | ||
.menu-icon-circle, | ||
.menu-icon-circle--active { | ||
margin: 0 14px; | ||
} | ||
} | ||
|
||
.dropdown-menu-item .fa.delete { | ||
color: var(--color-icon-default); | ||
margin-right: 10px; | ||
display: none; | ||
} | ||
|
||
.dropdown-menu-item:hover .fa.delete { | ||
display: inherit; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-droppo { | ||
background-color: var(--color-background-default); | ||
border-radius: 4px; | ||
right: 2px; | ||
|
||
.color-indicator { | ||
margin: 0 14px 0 4px; | ||
} | ||
|
||
@include design-system.screen-sm-min { | ||
right: calc(((100% - 85vw) / 2) + 2px); | ||
} | ||
|
||
@include design-system.screen-md-min { | ||
right: calc(((100% - 80vw) / 2) + 2px); | ||
} | ||
|
||
@include design-system.screen-lg-min { | ||
right: calc(((100% - 65vw) / 2) + 2px); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-name-item { | ||
flex: 1; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-check__transparent { | ||
opacity: 0; | ||
width: 24px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.menu-icon-circle, | ||
.menu-icon-circle--active { | ||
background: none; | ||
border-radius: 22px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border: 1px solid transparent; | ||
margin: 0 4px; | ||
} | ||
|
||
.menu-icon-circle--active { | ||
border: 1px solid var(--color-border-default); | ||
background: var(--color-background-default); | ||
} | ||
|
||
.menu-icon-circle div, | ||
.menu-icon-circle--active div { | ||
height: 12px; | ||
width: 12px; | ||
border-radius: 17px; | ||
} | ||
|
||
.menu-icon-circle--active div { | ||
opacity: 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-dropdown-header { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
|
||
.network-dropdown-list { | ||
max-height: 330px; | ||
overflow-y: auto; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.network-dropdown-divider { | ||
width: 100%; | ||
height: 1px; | ||
margin: 10px 0; | ||
background-color: var(--color-border-default); | ||
} | ||
|
||
.network-dropdown-title { | ||
@include design-system.H4; | ||
|
||
height: 25px; | ||
width: 120px; | ||
color: var(--color-text-default); | ||
text-align: center; | ||
} | ||
|
||
.network-dropdown-content { | ||
@include design-system.H6; | ||
|
||
min-height: 36px; | ||
width: 265px; | ||
color: var(--color-text-default); | ||
|
||
&--link { | ||
color: var(--color-primary-default); | ||
cursor: pointer; | ||
text-decoration: underline; | ||
|
||
&:hover { | ||
color: var(--color-primary-alternative); | ||
} | ||
} | ||
|
||
&--dismiss { | ||
position: absolute; | ||
top: 63px; | ||
right: 10px; | ||
padding: 2px 8px; | ||
width: auto; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-caret { | ||
margin: 0 8px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network-loading-spinner { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
align-items: center; | ||
position: relative; | ||
height: 16px; | ||
width: 16px; | ||
margin-left: 5px; | ||
|
||
img { | ||
height: 26px; | ||
position: absolute; | ||
top: -5px; | ||
left: -6px; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.network__add-network-button { | ||
padding: 0 16px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.lap-visible { | ||
display: flex; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.phone-visible { | ||
display: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.fiat-amount { | ||
text-transform: uppercase; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.token-balance__amount { | ||
padding: 0 6px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.unlock-screen-container { | ||
z-index: design-system.$main-container-z-index; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex: 1 0 auto; | ||
background: var(--color-background-alternative); | ||
width: 100%; | ||
} | ||
|
||
.unlock-screen { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
flex: 1 0 auto; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-screen-wrapper { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
z-index: 25; | ||
|
||
@include design-system.screen-sm-max { | ||
width: 100%; | ||
overflow-y: auto; | ||
} | ||
|
||
section { | ||
flex: 0 0 auto; | ||
} | ||
} | ||
|
||
.send-screen-card { | ||
background-color: var(--color-background-default); | ||
box-shadow: var(--shadow-size-xs) var(--color-shadow-default); | ||
padding: 46px 40.5px 26px; | ||
position: relative; | ||
align-items: center; | ||
display: flex; | ||
flex-flow: column nowrap; | ||
width: 498px; | ||
flex: 1 0 auto; | ||
|
||
@include design-system.screen-sm-max { | ||
top: 0; | ||
width: 100%; | ||
box-shadow: none; | ||
padding: 12px; | ||
} | ||
} | ||
|
||
/* Send Screen */ | ||
|
||
.send-screen section { | ||
margin: 4px 16px; | ||
} | ||
|
||
.send-screen input { | ||
@include design-system.H7; | ||
|
||
width: 100%; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-eth-icon { | ||
border-radius: 50%; | ||
width: 70px; | ||
height: 70px; | ||
border: 1px solid var(--color-border-muted); | ||
box-shadow: var(--shadow-size-xs) var(--color-shadow-default); | ||
position: absolute; | ||
top: -35px; | ||
z-index: 25; | ||
padding: 4px; | ||
background-color: var(--color-background-default); | ||
|
||
@include design-system.screen-sm-max { | ||
position: relative; | ||
top: 0; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-screen-input-wrapper { | ||
width: 95%; | ||
position: relative; | ||
|
||
.fa-bolt { | ||
padding-right: 4px; | ||
} | ||
|
||
.send-screen-gas-input { | ||
border: 1px solid transparent; | ||
} | ||
|
||
&__error-message { | ||
display: none; | ||
} | ||
|
||
&--error { | ||
input, | ||
.send-screen-gas-input { | ||
border-color: var(--color-error-default) !important; | ||
} | ||
|
||
.send-screen-input-wrapper__error-message { | ||
@include design-system.H7; | ||
|
||
display: block; | ||
position: absolute; | ||
bottom: 4px; | ||
left: 8px; | ||
color: var(--color-error-default); | ||
} | ||
} | ||
|
||
.send-screen-input-wrapper__error-message { | ||
@include design-system.H7; | ||
|
||
display: block; | ||
position: absolute; | ||
bottom: 4px; | ||
left: 8px; | ||
color: var(--color-error-default); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-screen-input { | ||
width: 100%; | ||
} | ||
|
||
.send-screen-gas-input { | ||
@include design-system.Paragraph; | ||
|
||
width: 100%; | ||
height: 41px; | ||
border-radius: 3px; | ||
background-color: var(--color-background-default); | ||
border-width: 0; | ||
border-style: none; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-left: 10px; | ||
padding-right: 12px; | ||
color: var(--color-text-alternative); | ||
} | ||
|
||
.send-screen-amount-labels { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
} | ||
|
||
.send-screen-gas-labels { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.currency-toggle { | ||
&__item { | ||
color: var(--color-primary-default); | ||
cursor: pointer; | ||
|
||
&--selected { | ||
color: var(--color-text-default); | ||
cursor: default; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-screen-gas-input-customize { | ||
@include design-system.H7; | ||
|
||
color: var(--color-primary-default); | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used "send-screen" screenshot above
.gas-tooltip-close-area { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: 1000; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.gas-tooltip-arrow { | ||
height: 25px; | ||
width: 25px; | ||
z-index: 1200; | ||
background: var(--color-background-default); | ||
position: absolute; | ||
transform: rotate(45deg); | ||
left: 107px; | ||
top: 294px; | ||
box-shadow: var(--shadow-size-xs) var(--color-shadow-default); | ||
} | ||
|
||
.gas-tooltip { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.gas-tooltip-label { | ||
@include design-system.Paragraph; | ||
|
||
color: var(--color-text-alternative); | ||
} | ||
|
||
.gas-tooltip-header { | ||
padding-bottom: 12px; | ||
} | ||
|
||
.gas-tooltip-input-label { | ||
margin-bottom: 5px; | ||
} | ||
|
||
.gas-tooltip-input-label i { | ||
color: var(--color-icon-muted); | ||
margin-left: 6px; | ||
} | ||
|
||
.gas-tooltip-input-detail { | ||
@include design-system.H7; | ||
|
||
position: absolute; | ||
top: 4px; | ||
right: 26px; | ||
color: var(--color-text-muted); | ||
} | ||
|
||
.gas-tooltip-input-arrows { | ||
@include design-system.H6; | ||
|
||
position: absolute; | ||
top: 0; | ||
right: 4px; | ||
width: 17px; | ||
height: 28px; | ||
border: 1px solid var(--color-icon-muted); | ||
border-left: 0; | ||
display: flex; | ||
flex-direction: column; | ||
color: var(--color-text-muted); | ||
padding: 1px 4px; | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.token-gas { | ||
&__amount { | ||
display: inline-block; | ||
margin-right: 4px; | ||
} | ||
|
||
&__symbol { | ||
display: inline-block; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.send-screen { | ||
&__title { | ||
@include design-system.H4; | ||
|
||
color: var(--color-text-alternative); | ||
} | ||
|
||
&__subtitle { | ||
@include design-system.H6; | ||
|
||
margin: 10px 0 20px; | ||
} | ||
|
||
&__send-button, | ||
&__cancel-button { | ||
width: 163px; | ||
text-align: center; | ||
} | ||
|
||
&__send-button__disabled { | ||
opacity: 0.5; | ||
cursor: auto; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used see "send-screen" screenshot above
.send-token { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
z-index: 25; | ||
|
||
&__content { | ||
width: 498px; | ||
height: 605px; | ||
background-color: var(--color-background-default); | ||
box-shadow: var(--shadow-size-xs) var(--color-shadow-default); | ||
padding: 46px 40.5px 26px; | ||
position: relative; | ||
align-items: center; | ||
display: flex; | ||
flex-flow: column nowrap; | ||
flex: 1 0 auto; | ||
|
||
@include design-system.screen-sm-max { | ||
top: 0; | ||
width: 100%; | ||
box-shadow: none; | ||
padding: 12px; | ||
} | ||
} | ||
|
||
.identicon { | ||
position: absolute; | ||
top: -35px; | ||
z-index: 25; | ||
|
||
@include design-system.screen-sm-max { | ||
position: relative; | ||
top: 0; | ||
flex: 0 0 auto; | ||
} | ||
} | ||
|
||
&__title { | ||
@include design-system.H4; | ||
|
||
color: var(--color-text-alternative); | ||
} | ||
|
||
&__description, | ||
&__balance-text, | ||
&__token-symbol { | ||
@include design-system.H6; | ||
|
||
margin-top: 10px; | ||
text-align: center; | ||
} | ||
|
||
&__token-balance { | ||
@include design-system.H1; | ||
|
||
margin-top: 13px; | ||
|
||
.token-balance__amount { | ||
padding-right: 12px; | ||
} | ||
} | ||
|
||
&__button-group { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
align-items: center; | ||
flex: 0 0 auto; | ||
|
||
@include design-system.screen-sm-max { | ||
margin-top: 24px; | ||
} | ||
|
||
button { | ||
width: 163px; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.confirm-send-token { | ||
&__hero-amount-wrapper { | ||
width: 100%; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
} | ||
|
||
.send-v2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.advanced-gas-options-btn { | ||
@include design-system.H6; | ||
|
||
display: flex; | ||
justify-content: flex-end; | ||
color: var(--color-primary-default); | ||
cursor: pointer; | ||
margin-top: 5px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.sliders-icon-container { | ||
@include design-system.Paragraph; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 24px; | ||
width: 24px; | ||
border: 1px solid var(--color-primary-default); | ||
border-radius: 4px; | ||
background-color: var(--color-background-default); | ||
position: absolute; | ||
right: 15px; | ||
top: 14px; | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.gas-fee-reset { | ||
@include design-system.H6; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 24px; | ||
border-radius: 4px; | ||
background-color: var(--color-background-default); | ||
position: absolute; | ||
right: 12px; | ||
top: 14px; | ||
cursor: pointer; | ||
color: var(--color-primary-default); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.sliders-icon { | ||
color: var(--color-primary-default); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds ready [a085117]
Page Load Metrics (1605 ± 54 ms)
Bundle size diffs
|
.dropdown-menu-item { | ||
font-size: 14px !important; | ||
padding: 8px !important; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice clean up! LGTM
Description
This PR removes unused CSS classes and files from the codebase to improve maintainability and reduce CSS size by
~30kb
. The changes include:Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4172
Manual testing steps
Screenshots/Recordings
Before
After
Not visual regressions to the following flows"
Onboarding Flow
after.onboarding.mov
Send Flow
after.send.mov
Changing Network Flow
after.networks.mov
Unlock flow
after.password.mov
Pre-merge author checklist
Pre-merge reviewer checklist