-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: improve balance spacing, coloring and grouping (#691)
* chore: continue loop on errors in setIntervalDebounced * ui(balance): improve displaying balance value in BTC * chore: use cursor-pointer style class where applicable * ui(style): use only css to style bitcoin amount * refactor: add frozen flag to balance component * ui(balance): align colors with copy * ui(balance): deemphasize symbol on zero balance * test(balance): use testid to get balance element
- Loading branch information
1 parent
df81804
commit 821b227
Showing
13 changed files
with
272 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
:root { | ||
--jam-balance-color: #212529; | ||
--jam-balance-deemphasize-color: #9eacba; | ||
} | ||
|
||
:root[data-theme='dark'] { | ||
--jam-balance-color: #ffffff; | ||
--jam-balance-deemphasize-color: #555c62; | ||
} | ||
|
||
.frozen { | ||
--jam-balance-color: #0d6efd; | ||
--jam-balance-deemphasize-color: #7eb2ff; | ||
} | ||
|
||
:root[data-theme='dark'] .frozen { | ||
--jam-balance-color: #1372ff; | ||
--jam-balance-deemphasize-color: #1153b5; | ||
} | ||
|
||
.balance { | ||
color: var(--jam-balance-color); | ||
} | ||
|
||
.frozenSymbol { | ||
order: -2; | ||
} | ||
|
||
.bitcoinSymbol { | ||
padding-right: 0.1em; | ||
order: -1; | ||
} | ||
|
||
.satsSymbol { | ||
padding-right: 0.1em; | ||
order: 6; | ||
} | ||
|
||
.hideSymbol { | ||
padding-left: 0.1em; | ||
color: var(--jam-balance-deemphasize-color); | ||
} | ||
|
||
.bitcoinAmount .fractionalPart :nth-child(3)::before, | ||
.bitcoinAmount .fractionalPart :nth-child(6)::before { | ||
content: '\202F'; | ||
} | ||
|
||
/** Integer Part **/ | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .integerPart, | ||
/** Decimal Point **/ | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .decimalPoint, | ||
.bitcoinAmount[data-fractional-part-starts-with-zero="true"] .decimalPoint, | ||
/** Fractional Part **/ | ||
.bitcoinAmount[data-integer-part-is-zero="false"] .fractionalPart, | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]), | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"], | ||
.bitcoinAmount[data-integer-part-is-zero="true"] .fractionalPart :nth-child(1):is(span[data-digit="0"]) + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"] + span[data-digit="0"], | ||
/** Symbol */ | ||
.bitcoinAmount[data-raw-value="0"] + .bitcoinSymbol { | ||
color: var(--jam-balance-deemphasize-color); | ||
} | ||
|
||
.satsAmount[data-raw-value='0'], | ||
.satsAmount[data-raw-value='0'] + .satsSymbol { | ||
color: var(--jam-balance-deemphasize-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.