diff --git a/config/webpack.config.react.js b/config/webpack.config.react.js index 085d3367f0..714ec0a81f 100644 --- a/config/webpack.config.react.js +++ b/config/webpack.config.react.js @@ -45,7 +45,7 @@ module.exports = { extends: 'stylelint-config-standard', rules: { 'selector-pseudo-class-no-unknown': null, - 'unit-whitelist': ['px', 'deg', '%', 'em', 'ms'], + 'unit-whitelist': ['px', 'deg', '%', 'ms'], 'length-zero-no-unit': null, 'at-rule-no-unknown': null, }, diff --git a/src/components/app/type.css b/src/components/app/type.css index 994f6fc242..96a181e5df 100644 --- a/src/components/app/type.css +++ b/src/components/app/type.css @@ -86,7 +86,7 @@ a, b, i, strong { - font-size: var(--font-size-h6); + font-size: var(--paragraph-font-size-l); } strong { @@ -140,4 +140,8 @@ select { h5 { font-size: var(--font-size-h5-s); } + + p { + font-size: var(--paragraph-font-size-s); + } } diff --git a/src/components/app/variables.css b/src/components/app/variables.css index 204453fa8b..35116d7bc8 100644 --- a/src/components/app/variables.css +++ b/src/components/app/variables.css @@ -39,13 +39,13 @@ or "warn/action" ineastd of "red/green" /************************* Font *************************/ - --font-size-h1: 6.854em; - --font-size-h2: 4.236em; - --font-size-h3: 2.618em; - --font-size-h4: 1.618em; - --font-size-h5: 1.32em; - --font-size-h6: 1em; - --font-size-small: 0.875em; + --font-size-h1: 65px; + --font-size-h2: 32px; + --font-size-h3: 28px; + --font-size-h4: 26px; + --font-size-h5: 20px; + --font-size-h6: 16px; + --font-size-small: 14px; --heading-font: 'gilroy', 'Open Sans', sans-serif; --content-font: 'Open Sans', sans-serif; --font-weight-normal: 400; @@ -57,6 +57,7 @@ or "warn/action" ineastd of "red/green" --paragraph-font-size-l: 15px; --paragraph-font-size-s: 14px; --input-font-size: 16px; + --button-font-size: 16px; /* Font xl breakpoint */ --font-size-h2-xl: 32px; diff --git a/src/components/confirmVotes/confirmVotes.css b/src/components/confirmVotes/confirmVotes.css index e14223f6f7..fa286810bf 100644 --- a/src/components/confirmVotes/confirmVotes.css +++ b/src/components/confirmVotes/confirmVotes.css @@ -14,7 +14,6 @@ text-align: center; & h2 { - font-size: var(--font-size-h2-xl); margin: 0; } diff --git a/src/components/dashboard/currencyGraph.css b/src/components/dashboard/currencyGraph.css index 0a541f57a9..44d95042e0 100644 --- a/src/components/dashboard/currencyGraph.css +++ b/src/components/dashboard/currencyGraph.css @@ -65,7 +65,6 @@ min-height: 300px; & h2 { - font-size: var(--font-size-h2-l); margin: 45px var(--box-padding-left-M) 20px; } } diff --git a/src/components/dashboard/styles.css b/src/components/dashboard/styles.css index c96c008fea..8ddd34e59b 100644 --- a/src/components/dashboard/styles.css +++ b/src/components/dashboard/styles.css @@ -37,7 +37,6 @@ @media (--xLarge-viewport) { .latestActivity { & h2 { - font-size: var(--font-size-h2-xl); margin: 45px var(--box-padding-left-L) 20px; } } @@ -46,7 +45,6 @@ @media (--large-viewport) { .latestActivity { & h2 { - font-size: var(--font-size-h2-l); margin: 45px var(--box-padding-left-L) 20px; } } @@ -73,19 +71,12 @@ height: auto; & h2 { - font-size: var(--font-size-h2-l); margin: 45px var(--box-padding-left-M) 20px; } } } @media (--small-viewport) { - .latestActivity { - & h2 { - font-size: var(--font-size-h2-s); - } - } - .seeAllLink { display: block; margin-top: 16px; diff --git a/src/components/delegateList/delegateList.css b/src/components/delegateList/delegateList.css index 5533440c17..ae9bd6b93a 100644 --- a/src/components/delegateList/delegateList.css +++ b/src/components/delegateList/delegateList.css @@ -146,7 +146,6 @@ margin-bottom: 0; font-weight: 400; padding-bottom: 60px; - font-size: var(--main-header-font-size-XL); &.desktopTitle { display: block; @@ -376,10 +375,6 @@ @media (--large-viewport) { .header { padding: 20px var(--grid-padding-L); - - & h2 { - font-size: var(--main-header-font-size-L); - } } .delegatesList { @@ -508,10 +503,6 @@ .header { padding: 20px var(--grid-padding-XS); - & h2 { - font-size: var(--main-header-font-size-XS); - } - & .account { display: none; } diff --git a/src/components/dialog/dialog.css b/src/components/dialog/dialog.css index d49c6c3021..2d4b8b046f 100644 --- a/src/components/dialog/dialog.css +++ b/src/components/dialog/dialog.css @@ -9,7 +9,7 @@ & p { color: rgba(0, 0, 0, 0.87); - line-height: 1.4em; + line-height: 22px; } & header { diff --git a/src/components/fontIcon/icons.css b/src/components/fontIcon/icons.css index 633ccd965b..bdffb819a0 100755 --- a/src/components/fontIcon/icons.css +++ b/src/components/fontIcon/icons.css @@ -14,8 +14,8 @@ font-style: normal; font-size: 24px; display: inline-block; - width: 1em; - height: 1em; + width: 1em; /* stylelint-disable-line unit-whitelist */ + height: 1em; /* stylelint-disable-line unit-whitelist */ line-height: 1 !important; text-transform: none; letter-spacing: normal; diff --git a/src/components/login/login.css b/src/components/login/login.css index 251a1255e0..f2fb9964f9 100644 --- a/src/components/login/login.css +++ b/src/components/login/login.css @@ -4,6 +4,8 @@ --gradient: linear-gradient(45deg, rgba(0, 74, 255, 1) 0%, rgba(147, 244, 254, 1) 100%); --transition: all ease 300ms; --header-focused-font-size: 32px; + --arrow-font-size: 60px; + --arrow-focused-font-size: 40px; --rect-width: 200px; --login-box-padding-L: 48px; --login-box-padding-XL: 56px; @@ -234,7 +236,7 @@ } & .singUpArrow { - font-size: 1.2em; + font-size: var(--arrow-font-size); } & .subTitle { @@ -243,6 +245,7 @@ & a { text-decoration: none; + font-size: inherit; } & .shapes { @@ -254,11 +257,17 @@ transform: translateZ(0); & h2 { - font-size: var(--header-focused-font-size); + & a { + font-size: var(--header-focused-font-size); + } + + & .singUpArrow { + font-size: var(--arrow-focused-font-size); + } } & .subTitle { - font-size: 1em; + font-size: var(--subtitle-font-size); } & .shape { @@ -446,6 +455,7 @@ .login, .signUp { & h2 { + font-size: var(--font-size-h2-l); margin-top: 28vh; /* stylelint-disable-line */ } } @@ -456,6 +466,10 @@ border-radius: 0px; width: 60%; height: calc(100vh - var(--m-top-bar-height) - var(--m-menu-bar-height)); /* stylelint-disable-line */ + + & .singUpArrow { + font-size: var(--arrow-focused-font-size); + } } .login, @@ -480,6 +494,9 @@ & h2 { font-size: var(--font-size-h2-s); + } + + & h2 a { margin-top: 12vh; /* stylelint-disable-line */ } } diff --git a/src/components/multiStep/multiStep.css b/src/components/multiStep/multiStep.css index bfd87ca4b9..b3e528649f 100644 --- a/src/components/multiStep/multiStep.css +++ b/src/components/multiStep/multiStep.css @@ -58,7 +58,7 @@ height: 0; border-bottom: solid 2px var(--link-color); opacity: 0.5; - font-size: 0; + font-size: 0 !important; } & .icon { diff --git a/src/components/passphrase/confirm/confirm.css b/src/components/passphrase/confirm/confirm.css index 1eb2dfbe7c..a65a20a7ca 100644 --- a/src/components/passphrase/confirm/confirm.css +++ b/src/components/passphrase/confirm/confirm.css @@ -8,6 +8,7 @@ --header-animation-duration: 450ms; --second-header-animation-delay: 1000ms; --steps-nav-height: 22px; + --header-font-size: var(--paragraph-font-size-l); } .table { @@ -45,7 +46,7 @@ } & header { - font-size: 0.959em; + font-size: var(--header-font-size); & h2, & h5 { diff --git a/src/components/passphrase/create/create.css b/src/components/passphrase/create/create.css index 1d5f837d9b..f468a0f474 100644 --- a/src/components/passphrase/create/create.css +++ b/src/components/passphrase/create/create.css @@ -236,7 +236,7 @@ hr { margin: 0; & p { - margin-bottom: 1em !important; + margin-bottom: 16px !important; font-size: 16px; } diff --git a/src/components/passphrase/safekeeping/safekeeping.css b/src/components/passphrase/safekeeping/safekeeping.css index bfb7a534da..a319fb1422 100644 --- a/src/components/passphrase/safekeeping/safekeeping.css +++ b/src/components/passphrase/safekeeping/safekeeping.css @@ -7,6 +7,7 @@ --address-animation-duration: 1000ms; --header-animation-duration: 450ms; --second-header-animation-delay: 1000ms; + --header-font-size: var(--paragraph-font-size-l); } .table { @@ -60,7 +61,7 @@ } & header { - font-size: 0.959em; + font-size: var(--header-font-size); & h2, & h5 { diff --git a/src/components/passphraseSteps/passphraseSteps.css b/src/components/passphraseSteps/passphraseSteps.css index 99c5a655df..45e39a1c14 100644 --- a/src/components/passphraseSteps/passphraseSteps.css +++ b/src/components/passphraseSteps/passphraseSteps.css @@ -26,7 +26,6 @@ & h2 { font-weight: var(--font-weight-semi-bold); margin-bottom: 0; - font-size: 2em; } } diff --git a/src/components/resultBox/resultBox.css b/src/components/resultBox/resultBox.css index c502461580..523c0d1e1f 100644 --- a/src/components/resultBox/resultBox.css +++ b/src/components/resultBox/resultBox.css @@ -5,10 +5,11 @@ --paragraph-color: var(--color-grayscale-dark); --paragraph-line-height: 36px; --title-font-size: 32px; + --icon-font-size: 48px; } .icon { - font-size: 3em; + font-size: var(--icon-font-size); color: #ff6236; } @@ -31,10 +32,6 @@ line-height: var(--paragraph-line-height); } - & h2 { - font-size: var(--title-font-size); - } - & .copy { color: var(--copy-color); cursor: pointer; diff --git a/src/components/savedAccounts/savedAccounts.css b/src/components/savedAccounts/savedAccounts.css index 06dd8041f0..d36ed8dd86 100644 --- a/src/components/savedAccounts/savedAccounts.css +++ b/src/components/savedAccounts/savedAccounts.css @@ -1,11 +1,13 @@ @import '../app/variables.css'; :root { - --font-size-ids-h1-xl: 4em; - --font-size-ids-h1-l: 3em; - --font-size-ids-h1-s: 2em; - --font-size-card-h2: 2em; - --font-size-card-h2-s: 1.5em; + --font-size-ids-h1-xl: 64px; + --font-size-ids-h1-l: 48px; + --font-size-ids-h1-s: 32px; + --font-size-card-h2: 32px; + --font-size-card-h2-s: 24px; + --address-font-size: 18px; + --small-font-size: 20px; --close-button-shadow: 0 20px 20px 0 rgba(0, 32, 68, 0.25); --h1-padding-xl: 85px; --h1-padding-l: 40px; @@ -75,7 +77,7 @@ color: var(--color-black); & > small { - font-size: 0.6875em; + font-size: var(--small-font-size); } } @@ -116,7 +118,7 @@ .address { margin-bottom: 40px; color: var(--color-grayscale-dark); - font-size: 1.125em; + font-size: var(--address-font-size); } .cardIcon { @@ -184,7 +186,7 @@ .network, .unlocked { - font-size: 1em; + font-size: var(--font-size-h6); position: absolute; top: 0; padding: 24px; diff --git a/src/components/sendReadable/sendReadable.css b/src/components/sendReadable/sendReadable.css index 7bfcf2738b..91f546e618 100644 --- a/src/components/sendReadable/sendReadable.css +++ b/src/components/sendReadable/sendReadable.css @@ -60,15 +60,6 @@ input:read-only { } } -.temporarySuccessCheck { - /* values are not saved as variable since this will be deleted anyway */ - position: absolute; - bottom: -20px; - left: 155px; - font-size: 3em; - color: #ff6236; -} - .headerWrapper { padding: 20px 0px; @@ -82,7 +73,6 @@ input:read-only { & h2 { margin-bottom: 0; - font-size: 2em; } & h3 { diff --git a/src/components/sendTo/sendTo.css b/src/components/sendTo/sendTo.css index 3ab8860ebc..8991397c41 100644 --- a/src/components/sendTo/sendTo.css +++ b/src/components/sendTo/sendTo.css @@ -8,9 +8,6 @@ --header-subtitle-font-size-XL: 18px; --header-subtitle-font-size-L: 16px; --header-subtitle-font-size-XS: 14px; - --main-header-font-size-XL: 32px; - --main-header-font-size-L: 28px; - --main-header-font-size-XS: 24px; } .wrapper { @@ -61,8 +58,6 @@ @media (--xLarge-viewport) { .wrapper { & h2 { - font-size: var(--main-header-font-size-XL); - & .balanceUnit { font-size: var(--header-balance-unit-font-size-XL); } @@ -77,8 +72,6 @@ @media (--large-viewport) { .wrapper { & h2 { - font-size: var(--main-header-font-size-L); - & .balanceUnit { font-size: var(--header-balance-unit-font-size-L); } diff --git a/src/components/sendWritable/sendWritable.css b/src/components/sendWritable/sendWritable.css index 4dd1d72082..d44858d44e 100644 --- a/src/components/sendWritable/sendWritable.css +++ b/src/components/sendWritable/sendWritable.css @@ -102,22 +102,6 @@ input:read-only { padding-right: 85px; } -@media (--xLarge-viewport) { - .headerWrapper { - & h2 { - font-size: var(--font-size-h2-xl); - } - } -} - -@media (--large-viewport) { - .headerWrapper { - & h2 { - font-size: var(--font-size-h2-l); - } - } -} - @media (--small-viewport) { .headerWrapper { display: none; diff --git a/src/components/singleTransaction/transaction.css b/src/components/singleTransaction/transaction.css index 1106588646..1e6e88a33c 100644 --- a/src/components/singleTransaction/transaction.css +++ b/src/components/singleTransaction/transaction.css @@ -5,9 +5,6 @@ --title-bar-extra-padding-XS: 52px; --header-subtitle-font-size-XL: 18px; --header-subtitle-font-size-L: 16px; - --main-header-font-size-XL: 32px; - --main-header-font-size-L: 28px; - --main-header-font-size-XS: 24px; --grid-padding-XL: 48px; --grid-padding-L: 32px; --grid-padding-XS: 19px; @@ -51,7 +48,6 @@ padding: 20px var(--grid-padding-XL); & h2 { - font-size: var(--main-header-font-size-XL); margin-bottom: 7px; } } @@ -64,7 +60,6 @@ padding: 20px var(--grid-padding-L); & h2 { - font-size: var(--main-header-font-size-L); margin-bottom: 5px; } } @@ -93,10 +88,6 @@ & header { padding: 20px var(--grid-padding-XS) calc(20px + var(--title-bar-extra-padding-XS)) var(--grid-padding-XS); - - & h2 { - font-size: var(--main-header-font-size-XS); - } } & .content { diff --git a/src/components/toolbox/buttons/css/iconButton.css b/src/components/toolbox/buttons/css/iconButton.css deleted file mode 100644 index 6ac0950ad7..0000000000 --- a/src/components/toolbox/buttons/css/iconButton.css +++ /dev/null @@ -1,3 +0,0 @@ -.button { - font-size: 1em; -} diff --git a/src/components/toolbox/buttons/css/importantButton.css b/src/components/toolbox/buttons/css/importantButton.css index 6ac0950ad7..55b4325be9 100644 --- a/src/components/toolbox/buttons/css/importantButton.css +++ b/src/components/toolbox/buttons/css/importantButton.css @@ -1,3 +1,5 @@ +@import './base.css'; + .button { - font-size: 1em; + font-size: var(--button-font-size); } diff --git a/src/components/toolbox/buttons/css/lightButton.css b/src/components/toolbox/buttons/css/lightButton.css index 6ac0950ad7..55b4325be9 100644 --- a/src/components/toolbox/buttons/css/lightButton.css +++ b/src/components/toolbox/buttons/css/lightButton.css @@ -1,3 +1,5 @@ +@import './base.css'; + .button { - font-size: 1em; + font-size: var(--button-font-size); } diff --git a/src/components/toolbox/buttons/iconButton.js b/src/components/toolbox/buttons/iconButton.js index bcca2f39f4..e3e44b2c10 100644 --- a/src/components/toolbox/buttons/iconButton.js +++ b/src/components/toolbox/buttons/iconButton.js @@ -1,12 +1,11 @@ import React from 'react'; -import { themr } from 'react-css-themr'; import { IconButton as ToolBoxIconButton } from 'react-toolbox/lib/button'; -import iconButtonTheme from './css/iconButton.css'; +// this component is unnecessary and it need to be deleted class IconButton extends React.Component { render() { return ; } } -export default themr('iconButton', iconButtonTheme)(IconButton); +export default IconButton; diff --git a/src/components/toolbox/tables/css/theme.css b/src/components/toolbox/tables/css/theme.css deleted file mode 100644 index eb528e6c8a..0000000000 --- a/src/components/toolbox/tables/css/theme.css +++ /dev/null @@ -1,24 +0,0 @@ -table tbody tr td { - color: #3c5068 !important; - font-size: 1.2em !important; - border-bottom: 0 !important; - border-top: 0 !important; -} - -tr:nth-child(even) { - background: linear-gradient(to right, #fff, #f5f8fc); -} - -tr:nth-child(odd) { - background: #fff; -} - -table thead tr th { - color: #000 !important; - font-weight: bold !important; - font-size: 1.1em !important; -} - -table tbody tr:hover { - background: #e8f0fa !important; -} diff --git a/src/components/toolbox/tables/table.js b/src/components/toolbox/tables/table.js deleted file mode 100644 index 364677d6d2..0000000000 --- a/src/components/toolbox/tables/table.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { themr } from 'react-css-themr'; -import { Table as ToolBoxTable, TableHead, TableRow, TableCell } from 'react-toolbox/lib/table'; -import tableTheme from './css/theme.css'; - -const MTable = props => ; -const TBTable = themr('table', tableTheme)(MTable); - -export { - TBTable, - TableRow as TBTableRow, - TableCell as TBTableCell, - TableHead as TBTableHead, -}; diff --git a/src/components/toolbox/tables/table.test.js b/src/components/toolbox/tables/table.test.js deleted file mode 100644 index a4c9bd0345..0000000000 --- a/src/components/toolbox/tables/table.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { expect } from 'chai'; -import { mount } from 'enzyme'; -import { TBTable } from './table'; - -describe('Table wrapper', () => { - it('Creates only one instance of the table', () => { - const wrappedTable = mount(); - expect(wrappedTable.find('Table').length).to.equal(1); - }); -}); diff --git a/src/components/transactions/transactions.css b/src/components/transactions/transactions.css index 1f9d02349b..b52b18d8fd 100644 --- a/src/components/transactions/transactions.css +++ b/src/components/transactions/transactions.css @@ -15,9 +15,6 @@ --header-balance-unit-font-size-L: 18px; --header-subtitle-font-size-XL: 18px; --header-subtitle-font-size-L: 16px; - --main-header-font-size-XL: 32px; - --main-header-font-size-L: 28px; - --main-header-font-size-XS: 24px; --grid-padding-XL: var(--box-padding-left-L); /* L until we add this padding to everywhere else too */ --grid-padding-L: var(--box-padding-left-L); --grid-padding-M: var(--box-padding-left-M); @@ -65,7 +62,7 @@ color: inherit; } -@media screen and (max-width: 48em) { +@media (--small-viewport) { .hiddenXs { display: none; } @@ -290,8 +287,6 @@ padding: 20px var(--grid-padding-XL); & h2 { - font-size: var(--main-header-font-size-XL); - & .balanceUnit { font-size: var(--header-balance-unit-font-size-XL); } @@ -373,8 +368,6 @@ padding: 20px var(--grid-padding-L); & h2 { - font-size: var(--main-header-font-size-L); - & .balanceUnit { font-size: var(--header-balance-unit-font-size-L); } @@ -479,10 +472,6 @@ & header { padding: 20px var(--grid-padding-M); - & h2 { - font-size: var(--main-header-font-size-XS); - } - & .account { display: none; } diff --git a/src/components/votesPreview/votesPreview.css b/src/components/votesPreview/votesPreview.css index fcf5c7c230..73bab5d89e 100644 --- a/src/components/votesPreview/votesPreview.css +++ b/src/components/votesPreview/votesPreview.css @@ -3,9 +3,6 @@ :root { --danger-color: var(--color-error); --link-color: #0077bd; - --main-header-font-size-XL: var(--font-size-h2-xl); - --main-header-font-size-L: var(--font-size-h2-l); - --main-header-font-size-XS: var(--font-size-h2-s); --header-font-size: 28px; --link-font-size: 15px; --progress-bar-text-font-size: 13px; @@ -61,7 +58,6 @@ & h2 { font-weight: 400; margin: 0; - font-size: var(--main-header-font-size-XL); } & a { @@ -190,10 +186,6 @@ .wrapper { & header { margin-left: var(--box-padding-left-L); - - & h2 { - font-size: var(--main-header-font-size-L); - } } } } @@ -297,10 +289,3 @@ } } -@media (--xSmall-viewport) { - .wrapper { - & header h2 { - font-size: var(--main-header-font-size-XS); - } - } -}