From 203f7de94f0216b94334352dc535241ee9f91f6a Mon Sep 17 00:00:00 2001 From: cyril lopez Date: Mon, 16 Oct 2017 14:30:26 +0200 Subject: [PATCH] Fix styles due to bootstrap upgrade --- .../src/styles/libs/bootstrap/_buttons.scss | 4 +-- .../libs/bootstrap/mixins/_buttons.scss | 2 +- .../internals/webpack/webpack.dll.babel.js | 5 +-- .../src/components/PopUpWarning/styles.scss | 13 +++++-- packages/strapi-helper-plugin/package.json | 8 ++--- .../src/components/ContentHeader/styles.scss | 4 +-- .../admin/src/components/List/styles.scss | 2 +- .../src/components/PopUpForm/styles.scss | 12 +++++-- .../src/components/PopUpRelations/styles.scss | 3 +- .../src/components/TableList/styles.scss | 2 +- .../package.json | 3 +- .../admin/src/components/List/styles.scss | 7 ++++ .../src/components/PopUpWarning/styles.scss | 35 +++++++++++++++++++ .../package.json | 5 ++- 14 files changed, 81 insertions(+), 24 deletions(-) diff --git a/packages/strapi-admin/admin/src/styles/libs/bootstrap/_buttons.scss b/packages/strapi-admin/admin/src/styles/libs/bootstrap/_buttons.scss index 607f24a2d0..bf2b7b37fd 100755 --- a/packages/strapi-admin/admin/src/styles/libs/bootstrap/_buttons.scss +++ b/packages/strapi-admin/admin/src/styles/libs/bootstrap/_buttons.scss @@ -12,8 +12,8 @@ vertical-align: middle; user-select: none; border: $input-btn-border-width solid transparent; - @include button-size($input-btn-padding-y, $input-btn-padding-x, $font-size-base, $input-btn-line-height, $btn-border-radius); - @include transition($btn-transition); + // @include button-size($input-btn-padding-y, $input-btn-padding-x, $font-size-base, $input-btn-line-height, $btn-border-radius); + // @include transition($btn-transition); // Share hover and focus styles @include hover-focus { diff --git a/packages/strapi-admin/admin/src/styles/libs/bootstrap/mixins/_buttons.scss b/packages/strapi-admin/admin/src/styles/libs/bootstrap/mixins/_buttons.scss index 4aeaefadb2..76860c4a3f 100755 --- a/packages/strapi-admin/admin/src/styles/libs/bootstrap/mixins/_buttons.scss +++ b/packages/strapi-admin/admin/src/styles/libs/bootstrap/mixins/_buttons.scss @@ -21,7 +21,7 @@ @if $enable-shadows { box-shadow: $btn-box-shadow, 0 0 0 3px rgba($border, .5); } @else { - box-shadow: 0 0 0 3px rgba($border, .5); + box-shadow: 0 0 0 0px rgba($border, .5); } } diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js index 02a36c820b..3d3a879e13 100755 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js @@ -14,7 +14,7 @@ const webpack = require('webpack'); module.exports = { context: process.cwd(), entry: { - vendor: ['react', 'react-dom', 'react-intl', 'react-transition-group', 'immutable', 'lodash'] // Shared dependencies accross the admin and plugins. + vendor: ['react', 'react-dom', 'react-intl', 'reactstrap', 'react-transition-group', 'immutable', 'lodash'] // Shared dependencies accross the admin and plugins. }, devtool: 'cheap-module-source-map', output: { @@ -45,7 +45,8 @@ module.exports = { 'react-intl': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'react-intl'), 'react': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'react'), 'react-dom': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'react-dom'), - 'react-transition-group': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'react-transition-group') + 'react-transition-group': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'react-transition-group'), + 'reactstrap': path.resolve(__dirname, '..', '..', '..', 'node_modules', 'reactstrap') }, symlinks: false, extensions: [ diff --git a/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/styles.scss b/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/styles.scss index 758f64f1f9..8fd65acd71 100644 --- a/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/styles.scss +++ b/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/styles.scss @@ -53,6 +53,7 @@ position: relative; border-radius: 0.3rem; text-transform: capitalize; + background-color: transparent; cursor: pointer; font-family: Lato; &:focus { @@ -82,8 +83,11 @@ -webkit-font-smoothing: antialiased; color: white !important; border: none; - &:active { - box-shadow: inset 1px 1px 3px rgba(0,0,0,.15); + &:active, &:focus, &:hover { + box-shadow: inset 1px 1px 3px rgba(0,0,0,.15); + background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); + background-color: transparent; + border: none; } } .secondary { @@ -96,6 +100,11 @@ &:active { border: 0.15rem solid #F64D0A; } + &:focus, &:hover { + background-color: transparent; + color: #F64D0A; + border: 0.1rem solid #F64D0A; + } } .bordered { margin-top: -.4rem; diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index a3c07fc3f8..26cbc7a07f 100755 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -90,16 +90,16 @@ "postcss-smart-import": "^0.7.5", "precss": "^2.0.0", "prettier": "^1.5.3", - "react": "^16.0.0-rc.3", + "react": "^16.0.0", "react-datetime": "^2.8.6", - "react-dom": "^16.0.0-rc.3", + "react-dom": "^16.0.0", "react-helmet": "^5.1.3", "react-intl": "^2.3.0", "react-redux": "^5.0.6", "react-router-dom": "^4.1.2", "react-router-redux": "^5.0.0-alpha.6", "react-transition-group": "^2.2.0", - "reactstrap": "^5.0.0-alpha.1", + "reactstrap": "^5.0.0-alpha.3", "redux": "^3.7.2", "redux-immutable": "^4.0.0", "redux-saga": "^0.15.6", @@ -115,4 +115,4 @@ "webpack-hot-middleware": "^2.18.2", "whatwg-fetch": "^2.0.3" } -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-content-type-builder/admin/src/components/ContentHeader/styles.scss b/packages/strapi-plugin-content-type-builder/admin/src/components/ContentHeader/styles.scss index 873a80a211..8ff27cbabd 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/components/ContentHeader/styles.scss +++ b/packages/strapi-plugin-content-type-builder/admin/src/components/ContentHeader/styles.scss @@ -13,7 +13,7 @@ line-height: 2.9rem; font-weight: 600; margin-bottom: 2px; - + > i { margin-top: 1.1rem; margin-left: 1rem; @@ -46,7 +46,7 @@ } .buttonContainer { - padding-top: .3rem; + padding-top: .4rem; > button:last-child { margin-right: 0; } diff --git a/packages/strapi-plugin-content-type-builder/admin/src/components/List/styles.scss b/packages/strapi-plugin-content-type-builder/admin/src/components/List/styles.scss index c531c89bc6..e72099042a 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/components/List/styles.scss +++ b/packages/strapi-plugin-content-type-builder/admin/src/components/List/styles.scss @@ -23,7 +23,7 @@ .ulContainer { > ul { - margin-top: 1.6rem; + margin-top: 1.5rem; padding: 0; list-style: none; } diff --git a/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpForm/styles.scss b/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpForm/styles.scss index 00f4df6de8..e2d3adbc80 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpForm/styles.scss +++ b/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpForm/styles.scss @@ -88,7 +88,7 @@ position: relative; > button { z-index: 999; - + margin-right: -1.5rem; color: #C3C5C8; opacity: 1; @@ -97,7 +97,7 @@ &:hover, &:focus { color: #C3C5C8; opacity: 1; - outline: 0; + outline: 0!important; } > span { display: none; @@ -130,6 +130,11 @@ background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); -webkit-font-smoothing: antialiased; color: white!important; + &:hover, &:active { + border: none!important; + background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); + color: white; + } } .secondary { @@ -138,7 +143,8 @@ color: #F64D0A; border: 0.1rem solid #F64D0A; cursor: pointer; - &:hover { + background-color: transparent; + &:hover, &:active { color: #F64D0A; background-color: white; border: 0.1rem solid #F64D0A; diff --git a/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpRelations/styles.scss b/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpRelations/styles.scss index 3790c214e0..36564770ba 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpRelations/styles.scss +++ b/packages/strapi-plugin-content-type-builder/admin/src/components/PopUpRelations/styles.scss @@ -184,7 +184,8 @@ color: #F64D0A; border: 0.1rem solid #F64D0A; cursor: pointer; - &:hover { + background-color: transparent; + &:hover, &:active { color: #F64D0A; background-color: white; border: 0.1rem solid #F64D0A; diff --git a/packages/strapi-plugin-content-type-builder/admin/src/components/TableList/styles.scss b/packages/strapi-plugin-content-type-builder/admin/src/components/TableList/styles.scss index b01be88c71..d9885f36e5 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/components/TableList/styles.scss +++ b/packages/strapi-plugin-content-type-builder/admin/src/components/TableList/styles.scss @@ -29,7 +29,7 @@ padding: 0; list-style: none; > li:first-child { - margin-top: 0rem; + margin-top: 0.1rem; border-radius: 2px 2px 0 0; background-color: #F3F3F4; } diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 562c728a9e..b63d75429b 100755 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -31,7 +31,6 @@ "react": "^15.6.1", "react-dom": "^15.6.1", "react-transition-group": "^1.2.0", - "reactstrap": "^4.8.0", "strapi-generate": "3.0.0-alpha.5.5", "strapi-generate-api": "3.0.0-alpha.5.5" }, @@ -70,4 +69,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-settings-manager/admin/src/components/List/styles.scss b/packages/strapi-plugin-settings-manager/admin/src/components/List/styles.scss index c5087acd5c..5307203cc9 100755 --- a/packages/strapi-plugin-settings-manager/admin/src/components/List/styles.scss +++ b/packages/strapi-plugin-settings-manager/admin/src/components/List/styles.scss @@ -176,12 +176,19 @@ button { background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); -webkit-font-smoothing: antialiased; color: white!important; + &:active, &:focus, &:hover { + box-shadow: inset 1px 1px 3px rgba(0,0,0,.15); + background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); + background-color: transparent; + border: none; + } } .secondary { font-family: Lato; color: #F64D0A; border: 0.1rem solid #F64D0A; + background-color: transparent; cursor: pointer; &:hover { color: #F64D0A; diff --git a/packages/strapi-plugin-settings-manager/admin/src/components/PopUpWarning/styles.scss b/packages/strapi-plugin-settings-manager/admin/src/components/PopUpWarning/styles.scss index f2bf137e98..1be64beeb9 100644 --- a/packages/strapi-plugin-settings-manager/admin/src/components/PopUpWarning/styles.scss +++ b/packages/strapi-plugin-settings-manager/admin/src/components/PopUpWarning/styles.scss @@ -72,6 +72,7 @@ width: 15rem; border: none; background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); + -webkit-font-smoothing: antialiased; &:active { background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%); background-color: none!important; @@ -86,6 +87,11 @@ width: 15rem; color: #F64D0A; border: 0.1rem solid #F64D0A; + &:focus, &:hover { + background-color: transparent; + color: #F64D0A; + border: 0.1rem solid #F64D0A; + } } .buttonContainer { @@ -94,6 +100,35 @@ display: flex; margin-top: 3rem; justify-content: space-between; + > button { + height: 3rem; + width: 15rem; + position: relative; + border-radius: 0.3rem; + text-transform: capitalize; + background-color: transparent; + cursor: pointer; + font-family: Lato; + &:focus { + outline: 0; + } + > i { + margin-right: 1.3rem; + } + &:hover { + &::after { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + border-radius: 0.3rem; + content: ''; + opacity: 0.1; + background: #FFFFFF; + } + } + } } .modalBody { diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index d5236cebd8..0a9ce1fee1 100755 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -29,8 +29,7 @@ "react": "^15.6.1", "react-dom": "^15.6.1", "react-select": "^1.0.0-rc.5", - "react-transition-group": "^1.2.0", - "reactstrap": "^4.8.0" + "react-transition-group": "^1.2.0" }, "devDependencies": { "cross-env": "^5.0.5", @@ -67,4 +66,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} \ No newline at end of file +}