diff --git a/cashtab/src/components/Agora/Collection/styled.ts b/cashtab/src/components/Agora/Collection/styled.ts --- a/cashtab/src/components/Agora/Collection/styled.ts +++ b/cashtab/src/components/Agora/Collection/styled.ts @@ -95,9 +95,9 @@ display: flex; flex-direction: column; word-break: break-all; - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); font-weight: bold; - line-height: 20px; margin: 20px 0 0; `; export const CollectionIcon = styled.div<{ isCollapsed: boolean }>` diff --git a/cashtab/src/components/Agora/OrderBook/styled.ts b/cashtab/src/components/Agora/OrderBook/styled.ts --- a/cashtab/src/components/Agora/OrderBook/styled.ts +++ b/cashtab/src/components/Agora/OrderBook/styled.ts @@ -63,8 +63,8 @@ margin-top: 20px; a { margin: 0; - font-size: 26px; - line-height: 1.2em; + font-size: var(--text-2xl); + line-height: var(--text-2xl--line-height); height: 1.2em; overflow: hidden; color: ${props => props.theme.primaryText}; @@ -146,7 +146,8 @@ display: flex; align-items: center; gap: 3px; - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); z-index: 1; `; @@ -190,7 +191,8 @@ & > span { margin-right: 10px; font-weight: 600; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); color: ${props => props.theme.genesisGreen}; } input { @@ -209,17 +211,18 @@ align-items: flex-end; text-align: right; & > div { - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); opacity: 0.7; - line-height: 1em; } h3 { - font-size: 18px; + font-size: var(--text-2xl); margin: 0; margin-bottom: 20px; } button { - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); padding: 14px 10px; border-radius: 4px; margin-top: 30px; diff --git a/cashtab/src/components/Agora/styled.ts b/cashtab/src/components/Agora/styled.ts --- a/cashtab/src/components/Agora/styled.ts +++ b/cashtab/src/components/Agora/styled.ts @@ -16,7 +16,8 @@ margin-top: 12px; margin-bottom: 12px; color: ${props => props.theme.primaryText}; - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); text-align: center; font-weight: bold; `; diff --git a/cashtab/src/components/App/styles.ts b/cashtab/src/components/App/styles.ts --- a/cashtab/src/components/App/styles.ts +++ b/cashtab/src/components/App/styles.ts @@ -23,6 +23,21 @@ --toastify-color-success: ${props => props.theme.genesisGreen}; --toastify-toast-padding: 20px; --toastify-color-progress-dark: ${props => props.theme.accent}; + + --text-sm: 0.875rem; + --text-base: 1rem; /* 16px */ + --text-lg: 1.125rem; + --text-xl: 1.25rem; + --text-2xl: 1.5rem; + --text-3xl: 1.875rem; + + --text-sm--line-height: 1.428; + --text-base--line-height: 1.5; + --text-lg--line-height: 1.556; + --text-xl--line-height: 1.4; + --text-2xl--line-height: 1.333; + --text-3xl--line-height: 1.2; + --leading-7: 1.75; } .Toastify__toast { @@ -46,6 +61,10 @@ text-decoration: none; } } + + p { + line-height: var(--leading-7); + } `; export const CustomApp = styled.div` @@ -211,7 +230,8 @@ padding: 5px 10px; display: flex; align-items: center; - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); border: none; background: none; margin-bottom: 5px; @@ -291,7 +311,8 @@ @media (max-width: 768px) { flex-direction: row; justify-content: space-between; - font-size: 22px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); padding: 10px 20px 10px; margin-bottom: 0; } diff --git a/cashtab/src/components/Common/Atoms.tsx b/cashtab/src/components/Common/Atoms.tsx --- a/cashtab/src/components/Common/Atoms.tsx +++ b/cashtab/src/components/Common/Atoms.tsx @@ -57,17 +57,20 @@ export const ConvertAmount = styled.div` color: ${props => props.theme.primaryText}; width: 100%; - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); margin-bottom: 10px; @media (max-width: 768px) { - font-size: 12px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); } `; export const SwitchLabel = styled.div` text-align: left; color: ${props => props.theme.primaryText}; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); word-break: break-all; `; diff --git a/cashtab/src/components/Common/BalanceHeader.tsx b/cashtab/src/components/Common/BalanceHeader.tsx --- a/cashtab/src/components/Common/BalanceHeader.tsx +++ b/cashtab/src/components/Common/BalanceHeader.tsx @@ -14,12 +14,12 @@ export const BalanceXec = styled.div` display: flex; flex-direction: column; - font-size: 28px; + font-size: var(--text-3xl); + line-height: var(--text-3xl--line-height); margin-bottom: 0px; font-weight: bold; - line-height: 1.4em; @media (max-width: 768px) { - font-size: 24px; + font-size: var(--text-2xl); } `; export const BalanceRow = styled.div<{ @@ -52,9 +52,11 @@ }`} `; export const BalanceFiat = styled.div<{ balanceVisible: boolean }>` - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); @media (max-width: 768px) { - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); } color: ${props => props.balanceVisible ? 'transparent' : props.theme.secondaryText}; @@ -65,7 +67,8 @@ const EcashPrice = styled.p` padding: 0; margin: 0; - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); overflow: hidden; text-overflow: ellipsis; color: ${props => props.theme.secondaryText}; diff --git a/cashtab/src/components/Common/Buttons.tsx b/cashtab/src/components/Common/Buttons.tsx --- a/cashtab/src/components/Common/Buttons.tsx +++ b/cashtab/src/components/Common/Buttons.tsx @@ -9,7 +9,8 @@ import { toast } from 'react-toastify'; const BaseButtonOrLinkCss = css<{ disabled?: boolean }>` - font-size: 24px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); padding: 20px 12px; border-radius: 9px; transition: all 0.5s ease; @@ -23,7 +24,8 @@ box-shadow: ${props => props.theme.buttons.primary.hoverShadow}; } @media (max-width: 768px) { - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); padding: 15px 0; } display: flex; diff --git a/cashtab/src/components/Common/Inputs.tsx b/cashtab/src/components/Common/Inputs.tsx --- a/cashtab/src/components/Common/Inputs.tsx +++ b/cashtab/src/components/Common/Inputs.tsx @@ -39,7 +39,8 @@ const CashtabInput = styled.input<{ invalid?: boolean }>` ${props => props.disabled && `cursor: not-allowed`}; background-color: ${props => props.theme.secondaryBackground}; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); padding: 16px 12px; border-radius: 9px; width: 100%; @@ -60,7 +61,8 @@ const CashtabTextArea = styled.textarea<{ height: number }>` background-color: ${props => props.theme.secondaryBackground}; - font-size: 12px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); padding: 16px 12px; border-radius: 9px; width: 100%; @@ -98,7 +100,8 @@ border-radius: 0 9px 9px 0; background-color: ${props => props.theme.secondaryBackground}; border-left: none !important; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); padding: 16px; `; @@ -113,7 +116,8 @@ const CurrencyDropdown = styled.select<{ invalid?: boolean }>` cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')}; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); padding: 6px; color: ${props => props.invalid ? props.theme.formError : props.theme.primaryText}; @@ -141,7 +145,8 @@ `; const ErrorMsg = styled.div` - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.formError}; word-break: break-all; `; @@ -236,7 +241,8 @@ `; const TextAreaErrorMsg = styled.div` order: 0; - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.formError}; word-break: break-all; `; @@ -569,7 +575,8 @@ const SliderInput = styled.input<{ invalid?: boolean }>` ${props => props.disabled && `cursor: not-allowed`}; background-color: ${props => props.theme.secondaryBackground}; - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); padding: 6px; border-radius: 4px; text-align: right; @@ -685,7 +692,8 @@ const UploadText = styled.div` cursor: pointer; padding: 0.25rem; - font-size: 1rem; + font-size: var(--text-base); + line-height: var(--text-base--line-height); border: none; background-color: transparent; &:hover { diff --git a/cashtab/src/components/Common/Modal.tsx b/cashtab/src/components/Common/Modal.tsx --- a/cashtab/src/components/Common/Modal.tsx +++ b/cashtab/src/components/Common/Modal.tsx @@ -31,7 +31,8 @@ const ModalTitle = styled.div` font-weight: bold; padding: 6px 0; - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); text-align: center; width: 100%; color: ${props => props.theme.accent}; @@ -53,7 +54,8 @@ `; const ModalDescription = styled.div` color: ${props => props.theme.primaryText}; - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); margin: 12px 0; text-align: center; `; @@ -70,7 +72,8 @@ transform: translate(-50%, -50%); `; const ModalBaseButton = styled.button` - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); padding: 8px 0; border-radius: 9px; transition: all 0.5s ease; @@ -108,7 +111,8 @@ `; const ModalExit = styled.button` position: absolute; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); z-index: 1001; right: 5px; top: 5px; diff --git a/cashtab/src/components/Common/Seed.js b/cashtab/src/components/Common/Seed.js --- a/cashtab/src/components/Common/Seed.js +++ b/cashtab/src/components/Common/Seed.js @@ -13,7 +13,8 @@ gap: 3px; `; const SeedRow = styled.code` - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); `; const CASHTAB_SEED_WORDCOUNT = 12; diff --git a/cashtab/src/components/Common/Switch.tsx b/cashtab/src/components/Common/Switch.tsx --- a/cashtab/src/components/Common/Switch.tsx +++ b/cashtab/src/components/Common/Switch.tsx @@ -50,7 +50,7 @@ width: 50%; height: ${props => (props.small ? '20' : '34')}px; line-height: ${props => (props.small ? '20' : '34')}px; - font-size: 14px; + font-size: var(--text-sm); color: white; font-weight: bold; box-sizing: border-box; diff --git a/cashtab/src/components/Common/WalletLabel.tsx b/cashtab/src/components/Common/WalletLabel.tsx --- a/cashtab/src/components/Common/WalletLabel.tsx +++ b/cashtab/src/components/Common/WalletLabel.tsx @@ -46,7 +46,8 @@ EXTRA_WIDTH_FOR_SELECT }px`}; cursor: pointer; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); padding: 6px; color: ${props => props.theme.primaryText}; border: none; diff --git a/cashtab/src/components/Configure/Configure.tsx b/cashtab/src/components/Configure/Configure.tsx --- a/cashtab/src/components/Configure/Configure.tsx +++ b/cashtab/src/components/Configure/Configure.tsx @@ -54,7 +54,8 @@ margin: 12px 0; `; const Headline = styled.div` - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); color: ${props => props.theme.primaryText}; font-weight: bold; `; diff --git a/cashtab/src/components/Etokens/CreateTokenForm/styles.ts b/cashtab/src/components/Etokens/CreateTokenForm/styles.ts --- a/cashtab/src/components/Etokens/CreateTokenForm/styles.ts +++ b/cashtab/src/components/Etokens/CreateTokenForm/styles.ts @@ -18,7 +18,8 @@ export const SwitchLabel = styled.div` text-align: left; color: ${props => props.theme.primaryText}; - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); `; export const EditIcon = styled.div` cursor: pointer; @@ -71,7 +72,8 @@ word-break: break-word; `; export const ButtonDisabledMsg = styled.div` - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.formError}; word-break: break-all; `; diff --git a/cashtab/src/components/Etokens/Token/styled.ts b/cashtab/src/components/Etokens/Token/styled.ts --- a/cashtab/src/components/Etokens/Token/styled.ts +++ b/cashtab/src/components/Etokens/Token/styled.ts @@ -95,8 +95,8 @@ flex-direction: column; h2 { margin: 0; - font-size: 26px; - line-height: 1.2em; + font-size: var(--text-2xl); + line-height: var(--text-2xl--line-height); font-weight: 600; text-align: center; } @@ -186,7 +186,8 @@ `; export const ButtonDisabledMsg = styled.div` - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.formError}; word-break: break-all; `; @@ -195,7 +196,8 @@ `; export const NftTitle = styled.div` color: ${props => props.theme.primaryText}; - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); text-align: center; font-weight: bold; `; @@ -259,13 +261,15 @@ `; export const NftNameTitle = styled.div` margin-top: 12px; - font-size: 24px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); font-weight: bold; color: ${props => props.theme.primaryText}; word-break: break-all; `; export const NftCollectionTitle = styled.div` - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); color: ${props => props.theme.primaryText}; word-break: break-all; `; @@ -281,7 +285,8 @@ display: flex; flex-wrap: wrap; width: 100%; - font-size: 12px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.primaryText}; `; export const AgoraPreviewRow = styled.div` diff --git a/cashtab/src/components/Etokens/TokenListItem.tsx b/cashtab/src/components/Etokens/TokenListItem.tsx --- a/cashtab/src/components/Etokens/TokenListItem.tsx +++ b/cashtab/src/components/Etokens/TokenListItem.tsx @@ -25,7 +25,8 @@ padding: 10px 0; justify-content: space-between; h4 { - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); color: ${props => props.theme.primaryText}; margin: 0; font-weight: bold; diff --git a/cashtab/src/components/Home/Tx/styled.ts b/cashtab/src/components/Home/Tx/styled.ts --- a/cashtab/src/components/Home/Tx/styled.ts +++ b/cashtab/src/components/Home/Tx/styled.ts @@ -104,7 +104,8 @@ display: flex; width: 100%; text-align: left; - font-size: 14px; + font-size: var(--text-sm); + line-height: var(--text-sm--line-height); color: ${props => props.theme.secondaryText}; `; export const AmountCol = styled.div` diff --git a/cashtab/src/components/Nfts/styled.ts b/cashtab/src/components/Nfts/styled.ts --- a/cashtab/src/components/Nfts/styled.ts +++ b/cashtab/src/components/Nfts/styled.ts @@ -17,8 +17,8 @@ export const SubHeader = styled.div` width: 100%; color: ${props => props.theme.primaryText}; - font-size: 24px; - line-height: 24px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); margin-bottom: 12px; `; @@ -26,7 +26,8 @@ margin-top: 12px; margin-bottom: 12px; color: ${props => props.theme.primaryText}; - font-size: 20px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); text-align: center; font-weight: bold; `; diff --git a/cashtab/src/components/OnBoarding/styles.js b/cashtab/src/components/OnBoarding/styles.js --- a/cashtab/src/components/OnBoarding/styles.js +++ b/cashtab/src/components/OnBoarding/styles.js @@ -15,7 +15,8 @@ export const WelcomeText = styled.p` width: 100%; - font-size: 16px; + font-size: var(--text-base); + line-height: var(--text-base--line-height); margin-bottom: 60px; text-align: left; `; diff --git a/cashtab/src/components/Receive/QRCode.js b/cashtab/src/components/Receive/QRCode.js --- a/cashtab/src/components/Receive/QRCode.js +++ b/cashtab/src/components/Receive/QRCode.js @@ -23,7 +23,8 @@ `; const Copied = styled.div` - font-size: 24px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); font-family: 'Roboto Mono', monospace; font-weight: bold; width: 100%; @@ -58,7 +59,8 @@ const ReceiveAddressHolder = styled.div` width: 100%; - font-size: 30px; + font-size: var(--text-3xl); + line-height: var(--text-3xl--line-height); font-weight: bold; color: ${props => props.theme.secondaryText}; text-align: center; @@ -99,7 +101,8 @@ `; const DisplayCopiedAddress = styled.span` - font-size: 24px; + font-size: var(--text-xl); + line-height: var(--text-xl--line-height); word-wrap: break-word; `; diff --git a/cashtab/src/components/Send/SendXec.tsx b/cashtab/src/components/Send/SendXec.tsx --- a/cashtab/src/components/Send/SendXec.tsx +++ b/cashtab/src/components/Send/SendXec.tsx @@ -129,7 +129,8 @@ const LocaleFormattedValue = styled.div` color: ${props => props.theme.primaryText}; font-weight: bold; - font-size: 1.17em; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); margin-bottom: 0; `; diff --git a/cashtab/src/components/SignVerifyMsg/SignVerifyMsg.js b/cashtab/src/components/SignVerifyMsg/SignVerifyMsg.js --- a/cashtab/src/components/SignVerifyMsg/SignVerifyMsg.js +++ b/cashtab/src/components/SignVerifyMsg/SignVerifyMsg.js @@ -35,7 +35,8 @@ gap: 12px; `; const SignatureLabel = styled.div` - font-size: 18px; + font-size: var(--text-lg); + line-height: var(--text-lg--line-height); color: ${props => props.theme.primaryText}; text-align: left; font-weight: bold;