From efab6d1676bdde7a987c6c65b2d7e08990b54373 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jun 2020 08:19:11 +1200 Subject: [PATCH 1/4] working --- client/homepage/stats-overview/style.scss | 6 +++--- client/stylesheets/abstracts/_variables.scss | 1 - packages/components/src/summary/style.scss | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/homepage/stats-overview/style.scss b/client/homepage/stats-overview/style.scss index 6cb2c3b8e55..f7629c0bea7 100644 --- a/client/homepage/stats-overview/style.scss +++ b/client/homepage/stats-overview/style.scss @@ -79,9 +79,9 @@ article.woocommerce-stats-overview__install-jetpack-promo { margin: 16px 4px; &.is-busy { - background-image: linear-gradient(-45deg, lighten($theme-color, 40%) 28%, #fff 0, #fff 72%, lighten($theme-color, 40%) 0); + background-image: linear-gradient(-45deg, color($theme-color tint(40%)) 28%, #fff 0, #fff 72%, color($theme-color tint(40%)) 0); cursor: progress; - color: lighten($theme-color, 20%); + color: color($theme-color tint(20%)); } } @@ -98,7 +98,7 @@ article.woocommerce-stats-overview__install-jetpack-promo { } &.is-busy:not(:disabled) { - background-image: linear-gradient(-45deg, $theme-color 28%, darken($theme-color, 20%) 0, darken($theme-color, 20%) 72%, $theme-color 0) !important; + background-image: linear-gradient(-45deg, $theme-color 28%, color($theme-color shade(20%)) 0, color($theme-color shade(20%)) 72%, $theme-color 0) !important; color: $theme-color; } } diff --git a/client/stylesheets/abstracts/_variables.scss b/client/stylesheets/abstracts/_variables.scss index 70ee79b37aa..077ad300569 100644 --- a/client/stylesheets/abstracts/_variables.scss +++ b/client/stylesheets/abstracts/_variables.scss @@ -60,7 +60,6 @@ $adminbar-height-mobile: 46px; // wp-admin colors $wp-admin-background: #f1f1f1; $wp-admin-sidebar: #24292d; -$theme-color: #3858e9; // Muriel $muriel-box-shadow-1dp: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), diff --git a/packages/components/src/summary/style.scss b/packages/components/src/summary/style.scss index 2e92cd90fda..ca04758ebb2 100644 --- a/packages/components/src/summary/style.scss +++ b/packages/components/src/summary/style.scss @@ -277,7 +277,7 @@ $border: $light-gray-tertiary; &:hover { background-color: $light-gray-100; - color: darken($theme-color, 20%); + color: color($theme-color shade(20%)); } &:active { From 460aa96d8ae1f928384e79dbe878b3f184b04dd2 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jun 2020 08:55:17 +1200 Subject: [PATCH 2/4] update webpack --- package-lock.json | 45 +++++++++++++++++++++++++++++++++------------ package.json | 1 + webpack.config.js | 8 ++++---- 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2a403f5287..eb8b1acc86b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6704,6 +6704,35 @@ "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-2.2.0.tgz", "integrity": "sha512-8Td9vWekCwZCPfWkVWKQllim/F/m0uN1cma3KkBsKxi0liftj/iXpDBDH6wDxsv8z1Gbwq+H9a4D6w7Ob8SqtQ==" }, + "@wordpress/postcss-plugins-preset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-1.0.0.tgz", + "integrity": "sha512-KK7eLFlzLFfne2+7qrpekqWpOypcDlupkYCCPcBjVg7YfE5+SAntVTXgh3ss08FaMTVdOy4aZw3jfKl4oUMMYA==", + "dev": true, + "requires": { + "@wordpress/base-styles": "^1.9.0", + "@wordpress/postcss-themes": "^2.4.0", + "autoprefixer": "^9.4.5", + "postcss-color-function": "^4.0.1" + }, + "dependencies": { + "@wordpress/base-styles": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-1.9.0.tgz", + "integrity": "sha512-AuqLpbGFV0Jt+uYHEHjvv6ewBzjJOo0MytAMy0J3CK9KOc/XiZsLHbbGG1mS2cuQiWQATfjP5sjHveQzQ2zBNQ==", + "dev": true + }, + "@wordpress/postcss-themes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-themes/-/postcss-themes-2.4.0.tgz", + "integrity": "sha512-sD1/bpS7pEEn73D+Bwldfjy6dCA8Thz9WhDsSq72vKaLgIfDFNeMs7vRuxNHo3H3hs+tTOV00ZvkQsDSqe8dpw==", + "dev": true, + "requires": { + "postcss": "^7.0.13" + } + } + } + }, "@wordpress/postcss-themes": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@wordpress/postcss-themes/-/postcss-themes-1.0.5.tgz", @@ -8878,8 +8907,7 @@ "binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", - "optional": true + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" }, "bindings": { "version": "1.5.0", @@ -9759,7 +9787,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "optional": true, "requires": { "fill-range": "^7.0.1" } @@ -9768,7 +9795,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "optional": true, "requires": { "to-regex-range": "^5.0.1" } @@ -9776,14 +9802,12 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "optional": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "optional": true, "requires": { "is-number": "^7.0.0" } @@ -16918,7 +16942,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "optional": true, "requires": { "binary-extensions": "^2.0.0" } @@ -17909,8 +17932,7 @@ "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "@types/yargs-parser": "*" } }, "acorn": { @@ -23629,7 +23651,7 @@ "dev": true }, "prettier": { - "version": "1.19.1", + "version": "npm:wp-prettier@1.19.1", "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", "dev": true @@ -25281,7 +25303,6 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", - "optional": true, "requires": { "picomatch": "^2.2.1" } diff --git a/package.json b/package.json index 1b86de5ede1..f7315ab77be 100644 --- a/package.json +++ b/package.json @@ -167,6 +167,7 @@ "@wordpress/custom-templated-path-webpack-plugin": "1.6.0", "@wordpress/eslint-plugin": "3.4.1", "@wordpress/jest-preset-default": "5.5.0", + "@wordpress/postcss-plugins-preset": "^1.0.0", "@wordpress/postcss-themes": "1.0.5", "ast-types": "0.13.3", "autoprefixer": "9.8.0", diff --git a/webpack.config.js b/webpack.config.js index dff329c00ef..092166da71a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -72,6 +72,8 @@ wpAdminScripts.forEach( ( name ) => { entryPoints[ name ] = `./client/wp-admin-scripts/${ name }`; } ); +const postcssPlugins = require( '@wordpress/postcss-plugins-preset' ); + const webpackConfig = { mode: NODE_ENV, entry: { @@ -139,12 +141,10 @@ const webpackConfig = { MiniCssExtractPlugin.loader, 'css-loader', { - // postcss loader so we can use autoprefixer and theme Gutenberg components loader: 'postcss-loader', options: { - config: { - path: 'postcss.config.js', - }, + ident: 'postcss', + plugins: postcssPlugins, }, }, { From dbddd74b99eae7c8111fd411142e4e230365f375 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jun 2020 09:30:50 +1200 Subject: [PATCH 3/4] packages --- bin/packages/build.js | 2 +- postcss.config.js | 25 ------------------------- readme.txt | 2 +- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 postcss.config.js diff --git a/bin/packages/build.js b/bin/packages/build.js index f7c708e7e05..d8699c0c26d 100755 --- a/bin/packages/build.js +++ b/bin/packages/build.js @@ -139,7 +139,7 @@ function buildScssFile( styleFile ) { .join( ' ' ) + fs.readFileSync( styleFile, 'utf8' ), } ); - const postCSSConfig = require( '../../postcss.config' ).plugins[ 0 ]; + const postCSSConfig = require( '@wordpress/postcss-plugins-preset' ); const postCSSSync = ( callback ) => { postcss( postCSSConfig ) .process( builtSass.css, { diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index adbd717c9ba..00000000000 --- a/postcss.config.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - plugins: [ - require( '@wordpress/postcss-themes' )( { - // @todo A default is required for now. Fix postcss-themes to allow no default - defaults: { - primary: '#0085ba', - secondary: '#11a0d2', - toggle: '#11a0d2', - button: '#0085ba', - outlines: '#007cba', - }, - themes: { - 'woocommerce-page': { - primary: '#7f54b3', - secondary: '#3858e9', - toggle: '#674399', - button: '#3858e9', - outlines: '#c9356e', - }, - }, - } ), - require( 'autoprefixer' )( { grid: true } ), - require( 'postcss-color-function' ), - ], -}; diff --git a/readme.txt b/readme.txt index 9dd3ad4212e..c59066cb278 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, store, sales, reports, analytics, dashboard, activi Requires at least: 5.3.0 Tested up to: 5.4.1 Requires PHP: 5.6.20 -Stable tag: 1.2.3 +Stable tag: 1.2.3 License: GPLv3 License URI: https://github.com/woocommerce/woocommerce-admin/blob/master/license.txt From f88e6c0ade3254020a72566f1e9f0785d231b4f2 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jun 2020 10:04:11 +1200 Subject: [PATCH 4/4] quicklinks working --- client/quick-links/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/quick-links/style.scss b/client/quick-links/style.scss index 4de7ec39347..fc5e4c372e2 100644 --- a/client/quick-links/style.scss +++ b/client/quick-links/style.scss @@ -8,7 +8,7 @@ } } -.woocommerce-page .woocommerce-quick-links__list { +.woocommerce-quick-links__list { margin: 0; padding: 0;