Open coder-karen opened 1 year ago
Regarding color variables in particular, likely we should look into having @wordpress/dependency-extraction-webpack-plugin extract a dependency on a package that provides the variables, both these and those from @automattic/calypso-color-schemes, instead of embedding them in every bundle even once.
Then we also need to look at removing the use of postcss-custom-properties with preserve: false
(and also the importFrom
, since they're wanting to deprecate that).
The Issue
Various improvements can be made to how CSS variables / selectors are added and used throughout Jetpack. For this specific issue, the suggestions are based on CSS that currently exists in the Base Styles package.
Suggested Changes
The suggestions were made in this PR comment - pasting them in below as is: https://github.com/Automattic/jetpack/pull/28024#issuecomment-1362130569