Repository navigation
Site Title: Drop the Fit text !important rule from editor.scss - #85166
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: -225 B (0%) Total Size: 8.97 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Regression: updating a specific option will only change its value and will not corrupt others in
|
4524c66 to
a36c42e
Compare


Related:
What?
Removes the
!importantFit text rule from the Site Title editor styles. The editable title now sets its ownwhite-spaceinline.Why?
Rich text puts an inline
white-space: pre-wrapon the editable element. With Fit text on, that kept the title wrapping, soeditor.scssoverrode it withwhite-space: inherit !important.Rich text keeps an inline
white-spacethat is already set, so the block can pass the right value directly. That removes the need for!important.How?
style={ { whiteSpace: fitText ? 'inherit' : 'pre-wrap' } }on the editableRichText.normal.!importantrule. The placeholder rule andeditorStylestay.The read-only title (users who cannot edit site settings) has no rich text, so it needs no change.
Testing Instructions
Checked at 1440px and 390px. Every computed value matches trunk:
white-spacewhite-spacepre-wrap(beaten by!important)nowrapinheritnowrappre-wrappre-wrapUse of AI Tools
Implemented and verified by a Claude Code agent from a predefined task.