From b6717497aa24d06182d425ce3a1847c138abb1b3 Mon Sep 17 00:00:00 2001 From: Griffithtp Date: Sat, 6 Jul 2019 00:09:38 +0100 Subject: [PATCH] refactor: remove scss files --- .../Header/__snapshots__/Header.test.tsx.snap | 4 +- src/styles/core.scss | 22 ------- src/styles/global.scss | 47 -------------- src/styles/main.scss | 2 - src/styles/mixins.scss | 46 ------------- src/styles/typeface-roboto.scss | 1 - src/styles/variables.scss | 65 ------------------- src/utils/styles/global.ts | 4 +- tools/webpack.config.js | 6 -- 9 files changed, 4 insertions(+), 193 deletions(-) delete mode 100644 src/styles/core.scss delete mode 100644 src/styles/global.scss delete mode 100644 src/styles/main.scss delete mode 100644 src/styles/mixins.scss delete mode 100644 src/styles/typeface-roboto.scss delete mode 100644 src/styles/variables.scss diff --git a/src/components/Header/__snapshots__/Header.test.tsx.snap b/src/components/Header/__snapshots__/Header.test.tsx.snap index 91511b7..547a7a4 100644 --- a/src/components/Header/__snapshots__/Header.test.tsx.snap +++ b/src/components/Header/__snapshots__/Header.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`
component with logged in state should load the component in logged in state 1`] = `"
"`; +exports[`
component with logged in state should load the component in logged in state 1`] = `"
"`; -exports[`
component with logged out state should load the component in logged out state 1`] = `"
"`; +exports[`
component with logged out state should load the component in logged out state 1`] = `"
"`; diff --git a/src/styles/core.scss b/src/styles/core.scss deleted file mode 100644 index 4eddaac..0000000 --- a/src/styles/core.scss +++ /dev/null @@ -1,22 +0,0 @@ -@import "variables"; - -html, -body { - height: 100%; -} - -body { - font-family: $font-family-base; - font-size: $font-size-base; - color: $text-color; -} - -ul { - margin: 0; - padding: 0; - list-style: none; -} - -strong { - font-weight: $font-weight-semibold; -} diff --git a/src/styles/global.scss b/src/styles/global.scss deleted file mode 100644 index e337361..0000000 --- a/src/styles/global.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "variables"; -@import "mixins"; - -:global { - .container { - padding: 15px; - flex: 1; - - @include container-size; - - .el-loading-spinner { - margin-top: 0 !important; - } - } - - .content { - display: flex; - } - - .page-full-height { - display: flex; - flex-direction: column; - min-height: 100vh; - overflow: hidden; - } - - .el-button { - &:hover, &:focus { - color: $primary-color; - border-color: $primary-color; - } - } - - .el-input__inner { - &:hover, &:focus { - border-color: $primary-color; - } - } - - .el-dialog__headerbtn:hover .el-dialog__close { - color: $eclipse; - } - - .package-list-items { - width: 100%; - } -} diff --git a/src/styles/main.scss b/src/styles/main.scss deleted file mode 100644 index 555460d..0000000 --- a/src/styles/main.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import "core"; -@import "global"; diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss deleted file mode 100644 index 2b2bc0e..0000000 --- a/src/styles/mixins.scss +++ /dev/null @@ -1,46 +0,0 @@ -@import "variables"; - -@mixin border($direction, $width, $style, $color) { - border-#{$direction}: $width $style $color; -} - -@mixin border-bottom-default($color) { - border-bottom: 1px solid $color; -} - -@mixin searchBox { - width: 100%; - font-size: $font-size-md; - line-height: $line-height-xl; - border: none; - @include border-bottom-default($grey-light); - outline: none; - - &:focus { - @include border-bottom-default($grey); - } -} - -@mixin ellipsis { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -@mixin fullSize { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; -} - -@mixin container-size { - @media screen and (min-width: $break-lg) { - max-width: $break-lg; - width: 100%; - margin-left: auto; - margin-right: auto; - } -} diff --git a/src/styles/typeface-roboto.scss b/src/styles/typeface-roboto.scss deleted file mode 100644 index f79f754..0000000 --- a/src/styles/typeface-roboto.scss +++ /dev/null @@ -1 +0,0 @@ -@import '~typeface-roboto'; diff --git a/src/styles/variables.scss b/src/styles/variables.scss deleted file mode 100644 index db5b32e..0000000 --- a/src/styles/variables.scss +++ /dev/null @@ -1,65 +0,0 @@ -// Verdaccio -// ------------------------- - -$black: #000; -$white: #fff; -$red: #d32f2f; -$grey: #808080; -$grey-light: #d3d3d3; -$grey-dark: #a9a9a9; - -$greyChateau: #95989a; -$greyGainsboro: #e3e3e3; -$greyAthens: #d3dddd; - -$eclipse: #3c3c3c; -$paleNavy: #e4e8f1; -$saltpan: #f7f8f6; -$snow: #f9f9f9; - -$nobel-01: #999999; -$nobel-02: #9f9f9f; - -// Main colors -// ------------------------- - -$primary-color: #4b5e40; -$seconday-color:#20232a; - -// Scaffolding -// ------------------------- - -$body-bg: $white; -$text-color: $eclipse; - -// Typography -// ------------------------- - - // Font Family from Bootstrap v4 Reboot.css -$font-family-reboot: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; -$font-family-base: $font-family-reboot; - -$font-size-xxl: 26px; -$font-size-xl: 24px; -$font-size-lg: 21px; -$font-size-md: 18px; -$font-size-base: 16px; -$font-size-sm: 14px; - -$line-height-xl: 30px; -$line-height-sm: 18px; -$line-height-xs: 2; -$line-height-xxs: 1.5; - -$font-weight-light: 400; -$font-weight-regular: 400; -$font-weight-semibold: 600; -$font-weight-bold: 700; - -$break-sm: 768px; -$break-lg: 1240px; - -// Spacing -// ------------------------- - -$space-lg: 30px; diff --git a/src/utils/styles/global.ts b/src/utils/styles/global.ts index 333ed62..a920d88 100644 --- a/src/utils/styles/global.ts +++ b/src/utils/styles/global.ts @@ -1,7 +1,7 @@ -import { injectGlobal, css } from 'emotion'; +import { injectGlobal } from 'emotion'; import { fontSize, fontWeight } from './sizes'; import colors from './colors'; -import mq, { breakpoints } from './media'; +import { breakpoints } from './media'; export default injectGlobal` html, diff --git a/tools/webpack.config.js b/tools/webpack.config.js index 25cd2ab..e13ed4f 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -71,12 +71,6 @@ module.exports = { limit: 50, }, }, - { - test: /\.scss$/, - exclude: /node_modules/, - loader: `style-loader!css-loader?module&sourceMap=false&localIdentName=[path][name]__[local]--[hash:base64:5] - !resolve-url-loader?keepQuery!sass-loader?sourceMap`, - }, { test: /\.css$/, use: [