Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Theme color: Use dynamic variable from user preferences #4558

Merged
merged 4 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
6 changes: 3 additions & 3 deletions client/homepage/stats-overview/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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%));
}
}

Expand All @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/quick-links/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
}

.woocommerce-page .woocommerce-quick-links__list {
.woocommerce-quick-links__list {
margin: 0;
padding: 0;

Expand Down
1 change: 0 additions & 1 deletion client/stylesheets/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
45 changes: 33 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/summary/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
25 changes: 0 additions & 25 deletions postcss.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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,
},
},
{
Expand Down