The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in our bug tracker.
Standardization of WP-Admin colors in WordPress 5.7
This is the first part of a larger project in cleaning up WordPress adminadmin(and super admin)CSSCSSCascading Style Sheets.. In WordPress 5.7, all colors used in the CSS is collapsed to one of 12 blues, greens, reds, and yellows, 13 grays, pure black, and pure white.
This new streamlined color palette collapses all the colors that used to be in the WordPress source code down to seven coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. colors and a range of 56 shades that meet the WCAG 2.0 AA recommended contrast ratio against white or black.
The colors are perceptually uniform from light to dark in each range, which means they start at white and get darker by the same amount with each step. Half the range has a 4.5 or higher contrast ratio against black, and the other half maintains the same contrast against white.
Standardizing on this set of colors will help contributors make consistent, accessible design decisions. Themes and PluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party developers are encouraged to use this new color palette, for better consistency between their products and WordPress Core.
Plugin authors that use the existing CSS Core classes should be all set up with the new color palette, as every Core class was updated accordingly.
A PostCSS tool to help plugin authors to switch to the new WP-Admin color palette
@ryelle also published a PostCSS tool which can be used on any CSS file to either replace or create a second CSS file with the 5.7 colors – this is essentially the same process that ran over core, so it should make the same matches in plugin CSS.
To use it, follow the usage guide from PostCSS for your setup. Follow the postcss.config.js in this gist to add the postcss-palettize-colors to your process. Make sure to define the palette colors using paletteOptions.
If you’re not using PostCSS or a build process yet, you can use this tool via the following steps:
Install the dependencies: npm i postcss postcss-cli https://github.com/ryelle/postcss-palettize-colors.git
Configure PostCSS – download the postcss.config.js in this gist. This includes the full color palette for wp-admin.
Run PostCSS via command line: npx postcss style.css --replace
Swap out style.css for the path to your CSS file. Note, this will overwrite your CSS file with the new color values.
Alternately, if you need to match colors in both 5.7 and older WordPress: you could use this command to create a separate 5.7-specific stylesheet, and check the version of WordPress to enqueue the correct CSS for each version: