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 the bug tracker.
WordPress 7.1 introduces a minWidth dimension 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. support, letting blocks opt in to setting a minimum width. This follows the same pattern as the existing minHeight support.
GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ issue:#76525 | PR:#76949
Background
Blocks already support several dimension properties: height, minHeight, and width. There was no matching control for a minimum width. Setting a floor on a block’s width is a common CSSCSSCascading Style Sheets. need. For example, you may want a container or layout element to stay usable and not collapse below a certain size on smaller viewports.
Until now, achieving this required custom CSS or a custom block style, since the design tools did not expose a min-width option. This release handles it natively through a new block support.
What changed
A new minWidth feature is registered under the existing dimensions block support. When a block opts in, a “Minimum width” control appears in the Dimensions panel, alongside the existing minimum height control. The value is applied as the CSS min-width property, and it supports dimension presets (dimensionSizes) where a theme provides them.
How to use it
A block opts in through its block.jsonsupports, the same way it opts in to minHeight:
If the active theme defines dimensionSizes presets, the control offers those presets, and selecting one applies the matching --wp--preset--dimension--{slug} custom property.
Where the control appears
The minimum width control follows the same visibility rules as other optional design tools:
In the block inspector, the control is not shown by default. A block must opt in through __experimentalDefaultControls to show it automatically. Otherwise, you reveal it from the panel’s options menu (the three-dots menu on the Dimensions panel headerHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.).
In Global Styles (Site Editor), the control is shown by default.
Block-level values set in the editor override the theme defaults, following the same cascade as other block supports.
Backwards compatibility
These are additive changes. No existing blocks are broken, and no action is required for most blocks and themes. Blocks that do not opt in behave exactly as before. Themes that do not enable the setting see no change.