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.
Introduction of presets across padding, margin and block gap
WordPress 6.1 introduces preset values for padding, margin and blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. gap. With those the editor implements consistent spacing of blocks and nested blocks out of the box.
The block editor design tools allowed users only to add custom values for the spacing around block content, eg. padding, margin, or gap.
This means that theme 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 authors had no ability to either limit users to a fixed list of spacing options, or to easily change spacing across all of a site’s content if custom spaces have been set on some blocks.
The solution: spacingScale object
theme.jsonhas been extended to include a spacing sizes preset option, similar to the existing font size presets. By default, the editor will generate a range of seven preset sizes that are shared across padding, margin and block gap.
This range is auto-generated from a spacingScale object in the theme.json settings section:
It is possible to generate as many steps as needed, and also to use a + operator instead of * to generate these. If a theme has a spacing scale that can’t be auto-generated, then it is possible to include a static array of values in theme.jsonsettings.spacing.spacingSizes.
The spacing sizes are converted to CSSCSSCascading Style Sheets. properties in the following format:
There are three reasons for the choice of slugs in the 10,20,30 format:
It is much easier to sort the sizes from smallest to highest, than if the likes of t-shirt sizes were used
For themes that wish to insert additional values between the CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. ones, e.g. a value between Medium and Large, it is easy to do so with a slug of 55
Allow for cross-theme/site compatibility of content if a theme does not support a spacing preset slug in existing content, e.g., a pattern from the pattern library. Numeric values enable a fall back to the nearest match in the current theme. This is also the reason the spacing sizes are generated on either side of Medium. Having a known Medium slug of 50 can hopefully make these fallbacks as accurate as possible.
In the editor UIUIUser interface spacing options default to providing the preset option with a toggle to switch back to custom values:
Disable Spacing Presets
Disable the spacing presets option by adding the value 0 to settings.spacing.spacingScale.steps in theme.json.
Disable the custom spacing sizes by setting settings.spacing.customSpacingSize to false.
Finalizing the details around these spacing presets has involved a lot of discussion with both theme authors and Core contributorsCore ContributorsCore contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org.. These discussions can be found at the links: