From 5d41a7f774c65c0ed8efb214664365e8c71f2890 Mon Sep 17 00:00:00 2001 From: William O'Beirne Date: Tue, 20 Mar 2018 16:08:57 -0400 Subject: [PATCH] Remove all LESS code (#1348) * Checking in removal process. * Final removal of all SCSS * Remove unnecessary test * tscheck --- common/assets/styles/bootstrap/mixins.less | 35 -- .../styles/bootstrap/mixins/alerts.less | 14 - .../bootstrap/mixins/background-variant.less | 9 - .../bootstrap/mixins/border-radius.less | 21 - .../styles/bootstrap/mixins/buttons.less | 73 ---- .../styles/bootstrap/mixins/center-block.less | 7 - .../styles/bootstrap/mixins/clearfix.less | 22 -- .../assets/styles/bootstrap/mixins/forms.less | 82 ---- .../styles/bootstrap/mixins/gradients.less | 59 --- .../bootstrap/mixins/grid-framework.less | 96 ----- .../assets/styles/bootstrap/mixins/grid.less | 134 ------- .../styles/bootstrap/mixins/hide-text.less | 21 - .../assets/styles/bootstrap/mixins/image.less | 25 -- .../styles/bootstrap/mixins/labels.less | 12 - .../styles/bootstrap/mixins/list-group.less | 30 -- .../styles/bootstrap/mixins/nav-divider.less | 10 - .../bootstrap/mixins/nav-vertical-align.less | 9 - .../styles/bootstrap/mixins/opacity.less | 8 - .../styles/bootstrap/mixins/pagination.less | 24 -- .../styles/bootstrap/mixins/panels.less | 24 -- .../styles/bootstrap/mixins/progress-bar.less | 10 - .../styles/bootstrap/mixins/reset-filter.less | 8 - .../styles/bootstrap/mixins/reset-text.less | 18 - .../styles/bootstrap/mixins/resize.less | 6 - .../mixins/responsive-visibility.less | 21 - .../assets/styles/bootstrap/mixins/size.less | 10 - .../styles/bootstrap/mixins/table-row.less | 28 -- .../bootstrap/mixins/text-emphasis.less | 9 - .../bootstrap/mixins/text-overflow.less | 8 - .../bootstrap/mixins/vendor-prefixes.less | 254 ------------ common/assets/styles/etherwallet-custom.less | 373 ------------------ .../assets/styles/etherwallet-ext-custom.less | 24 -- common/assets/styles/etherwallet-master.less | 7 - .../assets/styles/etherwallet-utilities.less | 92 ----- .../assets/styles/etherwallet-variables.less | 362 ----------------- .../SendTransaction/components/Donate.tsx | 35 -- .../Tabs/SendTransaction/components/index.ts | 1 - .../Tabs/Swap/components/BitcoinQR.scss | 6 + .../Tabs/Swap/components/BitcoinQR.tsx | 7 +- common/containers/Tabs/ViewWallet/index.tsx | 26 -- common/containers/Tabs/index.ts | 2 - common/index.tsx | 1 - common/sass/styles.scss | 1 + common/sass/styles/helpers.scss | 10 + common/sass/styles/overrides/forms.scss | 2 + common/sass/styles/scaffolding.scss | 6 + jest_config/jest.config.json | 2 +- jest_config/jest.int.config.json | 2 +- package.json | 2 - spec/pages/ViewWallet.spec.tsx | 16 - .../__snapshots__/ViewWallet.spec.tsx.snap | 34 -- webpack_config/config.js | 2 +- webpack_config/makeConfig.js | 14 +- 53 files changed, 33 insertions(+), 2081 deletions(-) delete mode 100755 common/assets/styles/bootstrap/mixins.less delete mode 100755 common/assets/styles/bootstrap/mixins/alerts.less delete mode 100755 common/assets/styles/bootstrap/mixins/background-variant.less delete mode 100755 common/assets/styles/bootstrap/mixins/border-radius.less delete mode 100755 common/assets/styles/bootstrap/mixins/buttons.less delete mode 100755 common/assets/styles/bootstrap/mixins/center-block.less delete mode 100755 common/assets/styles/bootstrap/mixins/clearfix.less delete mode 100755 common/assets/styles/bootstrap/mixins/forms.less delete mode 100755 common/assets/styles/bootstrap/mixins/gradients.less delete mode 100755 common/assets/styles/bootstrap/mixins/grid-framework.less delete mode 100755 common/assets/styles/bootstrap/mixins/grid.less delete mode 100755 common/assets/styles/bootstrap/mixins/hide-text.less delete mode 100755 common/assets/styles/bootstrap/mixins/image.less delete mode 100755 common/assets/styles/bootstrap/mixins/labels.less delete mode 100755 common/assets/styles/bootstrap/mixins/list-group.less delete mode 100755 common/assets/styles/bootstrap/mixins/nav-divider.less delete mode 100755 common/assets/styles/bootstrap/mixins/nav-vertical-align.less delete mode 100755 common/assets/styles/bootstrap/mixins/opacity.less delete mode 100755 common/assets/styles/bootstrap/mixins/pagination.less delete mode 100755 common/assets/styles/bootstrap/mixins/panels.less delete mode 100755 common/assets/styles/bootstrap/mixins/progress-bar.less delete mode 100755 common/assets/styles/bootstrap/mixins/reset-filter.less delete mode 100755 common/assets/styles/bootstrap/mixins/reset-text.less delete mode 100755 common/assets/styles/bootstrap/mixins/resize.less delete mode 100755 common/assets/styles/bootstrap/mixins/responsive-visibility.less delete mode 100755 common/assets/styles/bootstrap/mixins/size.less delete mode 100755 common/assets/styles/bootstrap/mixins/table-row.less delete mode 100755 common/assets/styles/bootstrap/mixins/text-emphasis.less delete mode 100755 common/assets/styles/bootstrap/mixins/text-overflow.less delete mode 100755 common/assets/styles/bootstrap/mixins/vendor-prefixes.less delete mode 100755 common/assets/styles/etherwallet-custom.less delete mode 100755 common/assets/styles/etherwallet-ext-custom.less delete mode 100755 common/assets/styles/etherwallet-master.less delete mode 100755 common/assets/styles/etherwallet-utilities.less delete mode 100755 common/assets/styles/etherwallet-variables.less delete mode 100644 common/containers/Tabs/SendTransaction/components/Donate.tsx create mode 100644 common/containers/Tabs/Swap/components/BitcoinQR.scss delete mode 100644 common/containers/Tabs/ViewWallet/index.tsx create mode 100644 common/sass/styles/helpers.scss delete mode 100644 spec/pages/ViewWallet.spec.tsx delete mode 100644 spec/pages/__snapshots__/ViewWallet.spec.tsx.snap diff --git a/common/assets/styles/bootstrap/mixins.less b/common/assets/styles/bootstrap/mixins.less deleted file mode 100755 index eeee4418..00000000 --- a/common/assets/styles/bootstrap/mixins.less +++ /dev/null @@ -1,35 +0,0 @@ -// Mixins -// -------------------------------------------------- -// Utilities -@import 'mixins/hide-text.less'; -@import 'mixins/opacity.less'; -@import 'mixins/image.less'; -@import 'mixins/labels.less'; -@import 'mixins/reset-filter.less'; -@import 'mixins/resize.less'; -@import 'mixins/responsive-visibility.less'; -@import 'mixins/size.less'; -@import 'mixins/reset-text.less'; -@import 'mixins/text-emphasis.less'; -@import 'mixins/text-overflow.less'; -@import 'mixins/vendor-prefixes.less'; -// Components -@import 'mixins/alerts.less'; -@import 'mixins/buttons.less'; -@import 'mixins/panels.less'; -@import 'mixins/pagination.less'; -@import 'mixins/list-group.less'; -@import 'mixins/nav-divider.less'; -@import 'mixins/forms.less'; -@import 'mixins/progress-bar.less'; -@import 'mixins/table-row.less'; -// Skins -@import 'mixins/background-variant.less'; -@import 'mixins/border-radius.less'; -@import 'mixins/gradients.less'; -// Layout -@import 'mixins/clearfix.less'; -@import 'mixins/center-block.less'; -@import 'mixins/nav-vertical-align.less'; -@import 'mixins/grid-framework.less'; -@import 'mixins/grid.less'; diff --git a/common/assets/styles/bootstrap/mixins/alerts.less b/common/assets/styles/bootstrap/mixins/alerts.less deleted file mode 100755 index 396196f4..00000000 --- a/common/assets/styles/bootstrap/mixins/alerts.less +++ /dev/null @@ -1,14 +0,0 @@ -// Alerts - -.alert-variant(@background; @border; @text-color) { - background-color: @background; - border-color: @border; - color: @text-color; - - hr { - border-top-color: darken(@border, 5%); - } - .alert-link { - color: darken(@text-color, 10%); - } -} diff --git a/common/assets/styles/bootstrap/mixins/background-variant.less b/common/assets/styles/bootstrap/mixins/background-variant.less deleted file mode 100755 index a85c22b7..00000000 --- a/common/assets/styles/bootstrap/mixins/background-variant.less +++ /dev/null @@ -1,9 +0,0 @@ -// Contextual backgrounds - -.bg-variant(@color) { - background-color: @color; - a&:hover, - a&:focus { - background-color: darken(@color, 10%); - } -} diff --git a/common/assets/styles/bootstrap/mixins/border-radius.less b/common/assets/styles/bootstrap/mixins/border-radius.less deleted file mode 100755 index 727cc150..00000000 --- a/common/assets/styles/bootstrap/mixins/border-radius.less +++ /dev/null @@ -1,21 +0,0 @@ -// Single side border-radius - -.border-top-radius(@radius) { - border-top-right-radius: @radius; - border-top-left-radius: @radius; -} - -.border-right-radius(@radius) { - border-bottom-right-radius: @radius; - border-top-right-radius: @radius; -} - -.border-bottom-radius(@radius) { - border-bottom-right-radius: @radius; - border-bottom-left-radius: @radius; -} - -.border-left-radius(@radius) { - border-bottom-left-radius: @radius; - border-top-left-radius: @radius; -} diff --git a/common/assets/styles/bootstrap/mixins/buttons.less b/common/assets/styles/bootstrap/mixins/buttons.less deleted file mode 100755 index 164a07e7..00000000 --- a/common/assets/styles/bootstrap/mixins/buttons.less +++ /dev/null @@ -1,73 +0,0 @@ -// Button variants -// -// Easily pump out default styles, as well as :hover, :focus, :active, -// and disabled options for all buttons - -.button-variant(@color; @background; @border) { - color: @color; - background-color: @background; - border-color: @border; - transition: all ease 250ms; - - &:focus, - &.focus { - color: @color; - background-color: darken(@background, 5%); - border-color: darken(@border, 5%); - transition: all ease 250ms; - } - &:hover { - color: @color; - background-color: darken(@background, 5%); - border-color: darken(@border, 5%); - transition: all ease 250ms; - } - &:active, - &.active, - .open > .dropdown-toggle& { - color: @color; - background-color: darken(@background, 5%); - border-color: darken(@border, 5%); - transition: all ease 250ms; - - &:hover, - &:focus, - &.focus { - color: @color; - background-color: darken(@background, 15%); - border-color: darken(@border, 15%); - transition: all ease 250ms; - } - } - &:active, - &.active, - .open > .dropdown-toggle& { - background-image: none; - } - &.disabled, - &[disabled], - fieldset[disabled] & { - &, - &:hover, - &:focus, - &.focus, - &:active, - &.active { - background-color: @background; - border-color: @border; - } - } - - .badge { - color: @background; - background-color: @color; - } -} - -// Button sizes -.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { - padding: @padding-vertical @padding-horizontal; - font-size: @font-size; - line-height: @line-height; - border-radius: @border-radius; -} diff --git a/common/assets/styles/bootstrap/mixins/center-block.less b/common/assets/styles/bootstrap/mixins/center-block.less deleted file mode 100755 index d18d6de9..00000000 --- a/common/assets/styles/bootstrap/mixins/center-block.less +++ /dev/null @@ -1,7 +0,0 @@ -// Center-align a block level element - -.center-block() { - display: block; - margin-left: auto; - margin-right: auto; -} diff --git a/common/assets/styles/bootstrap/mixins/clearfix.less b/common/assets/styles/bootstrap/mixins/clearfix.less deleted file mode 100755 index 3f7a3820..00000000 --- a/common/assets/styles/bootstrap/mixins/clearfix.less +++ /dev/null @@ -1,22 +0,0 @@ -// Clearfix -// -// For modern browsers -// 1. The space content is one way to avoid an Opera bug when the -// contenteditable attribute is included anywhere else in the document. -// Otherwise it causes space to appear at the top and bottom of elements -// that are clearfixed. -// 2. The use of `table` rather than `block` is only necessary if using -// `:before` to contain the top-margins of child elements. -// -// Source: http://nicolasgallagher.com/micro-clearfix-hack/ - -.clearfix() { - &:before, - &:after { - content: " "; // 1 - display: table; // 2 - } - &:after { - clear: both; - } -} diff --git a/common/assets/styles/bootstrap/mixins/forms.less b/common/assets/styles/bootstrap/mixins/forms.less deleted file mode 100755 index cde07d25..00000000 --- a/common/assets/styles/bootstrap/mixins/forms.less +++ /dev/null @@ -1,82 +0,0 @@ -// Form validation states -// -// Used in forms.less to generate the form validation CSS for warnings, errors, -// and successes. - -.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { - // Color the label and help text - .help-block, - .control-label, - .radio, - .checkbox, - .radio-inline, - .checkbox-inline, - &.radio label, - &.checkbox label, - &.radio-inline label, - &.checkbox-inline label { - color: @text-color; - } - // Set the border and box shadow on specific inputs to match - .form-control { - border-color: @border-color; - .box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075)); // Redeclare so transitions work - &:focus { - border-color: darken(@border-color, 10%); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 3px rgba(@brand-primary, 0.5); - } - } - // Set validation states also for addons - .input-group-addon { - color: @text-color; - border-color: @border-color; - background-color: @background-color; - } - // Optional feedback icon - .form-control-feedback { - color: @text-color; - } -} - -// Form control focus state -// -// Generate a customized focus state and for any input with the specified color, -// which defaults to the `@input-border-focus` variable. -// -// We highly encourage you to not customize the default value, but instead use -// this to tweak colors on an as-needed basis. This aesthetic change is based on -// WebKit's default styles, but applicable to a wider range of browsers. Its -// usability and accessibility should be taken into account with any change. -// -// Example usage: change the default blue border and shadow to white for better -// contrast against a dark gray background. -.form-control-focus(@color: @input-border-focus) { - @color-rgba: rgba(red(@color), green(@color), blue(@color), 0.6); - &:focus { - border-color: @color; - .box-shadow(~'inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}'); - } -} - -// Form control sizing -// -// Relative text size, padding, and border-radii changes for form controls. For -// horizontal sizing, wrap controls in the predefined grid classes. `