Conversation
This PR overrides the default pullquote block styles coming from the block library to fix the pullquote styles for our various themes.
This PR moves over some of the styles and fixes over to the main plugin so they also apply to block theme.
There was a problem hiding this comment.
Pull request overview
This PR packages an “alpha release” update for the Newspack theme + child themes, focusing on editor iframe compatibility, configurable author avatars, and several styling adjustments (pullquotes + WooCommerce), while removing legacy Yoast-specific code.
Changes:
- Add a shared Customizer setting for author avatar size and use it in author archive + author bio templates.
- Update block editor integrations to better support the iframed editor (assets + body classes) and adjust subtitle DOM insertion to target the canvas document.
- Refine styling for pullquotes and WooCommerce UI; remove Yoast customizations and a WooCommerce checkout heading.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| newspack-theme/template-parts/post/author-bio.php | Use shared author_avatar_size theme mod for avatar rendering in author bio. |
| newspack-theme/sass/styles/style-default/style-default.scss | Adds pullquote blockquote alignment override (currently problematic for centered pullquotes). |
| newspack-theme/sass/style-editor-overrides.scss | Update editor override selectors to new admin-color-* body class workaround. |
| newspack-theme/sass/style-editor-base.scss | Add box-sizing for .wp-block; adjust pullquote responsive styling. |
| newspack-theme/sass/plugins/woocommerce.scss | Add CSS var fallbacks; tweak checkbox sizing; remove terms wrapper styling. |
| newspack-theme/sass/blocks/_blocks.scss | Add pullquote border-color override for themes lacking explicit borders. |
| newspack-theme/js/src/post-subtitle/utils.js | Target iframe canvas document for subtitle insertion (needs robustness for timing). |
| newspack-theme/inc/yoast.php | Removed Yoast customization bootstrap. |
| newspack-theme/inc/yoast-bluesky-contact-method.php | Removed Yoast Bluesky contact method implementation. |
| newspack-theme/inc/woocommerce.php | Remove “Payment info” heading injection in checkout review step. |
| newspack-theme/inc/customizer.php | Add author_avatar_size setting + sanitization. |
| newspack-theme/functions.php | Adjust editor asset enqueue hooks for iframe editor; add admin-color-* editor body classes; remove Yoast include. |
| newspack-theme/archive.php | Use shared author_avatar_size for author archive avatar rendering. |
| newspack-scott/sass/style.scss | Pullquote spacing tweaks; broaden border-detection selectors. |
| newspack-scott/sass/style-editor.scss | Mirror Scott pullquote changes in editor stylesheet. |
| newspack-sacha/template-parts/post/author-bio.php | Use shared author_avatar_size for avatar rendering in author bio. |
| newspack-nelson/sass/style.scss | Make Nelson pullquote borders conditional on inline border styles; adjust selectors. |
| newspack-nelson/sass/style-editor.scss | Mirror Nelson pullquote changes in editor stylesheet. |
| newspack-katharine/sass/style.scss | Adjust Katharine pullquote border conditions + accent color (contains dead nested selector). |
| newspack-katharine/sass/style-editor.scss | Mirror Katharine pullquote changes in editor stylesheet (contains dead nested selector). |
| newspack-joseph/sass/style.scss | Make Joseph pullquote borders conditional on inline border styles. |
| newspack-joseph/sass/style-editor.scss | Mirror Joseph pullquote changes in editor stylesheet. |
Comments suppressed due to low confidence (2)
newspack-katharine/sass/style.scss:364
- This selector block excludes any inline styles containing
border-via:not([style*="border-"]), but inside it there is still a nested&[style*="border-width"]::beforerule. That nested rule can never match becauseborder-widthcontainsborder-, so it is dead code. Either remove the nested rule or adjust the outer condition to only exclude the specific border properties you intend to treat as “custom border”.
&:not(.is-style-solid-color):not(.has-background):not([style*="border-"]) {
blockquote {
padding-left: #{2 * structure.$size__spacing-unit};
}
newspack-katharine/sass/style-editor.scss:120
- Same issue as the front-end stylesheet: this block uses
:not([style*="border-"])but still contains a nested&[style*="border-width"]::beforerule further down in the block, which can never match. Removing the unreachable nested selector or narrowing the outer:not(...)will avoid confusion and make the intent clearer.
&:not(.is-style-solid-color):not(.has-background):not([style*="border-"]) {
blockquote {
padding-left: #{2 * structure.$size__spacing-unit};
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
|
|
||
| .wp-block-pullquote blockquote { |
| // In WordPress 7.0+ the editor is always iframed; use the canvas document. | ||
| // TODO: Remove `document` fallback once WordPress 7.0 is released and the non-iframed editor is no longer supported. | ||
| const editorCanvas = document.querySelector( 'iframe[name="editor-canvas"]' ); | ||
| const doc = ( editorCanvas && editorCanvas.contentDocument ) || document; | ||
| const titleEl = doc.querySelector( '.edit-post-visual-editor__post-title-wrapper' ); | ||
|
|
||
| if ( titleEl && typeof subtitle === 'string' ) { | ||
| let subtitleEl = document.getElementById( SUBTITLE_ID ); | ||
| let subtitleEl = doc.getElementById( SUBTITLE_ID ); | ||
| const titleParent = titleEl.parentNode; | ||
| if ( ! subtitleEl ) { | ||
| subtitleEl = document.createElement( 'div' ); | ||
| subtitleEl = doc.createElement( 'div' ); | ||
| subtitleEl.id = SUBTITLE_ID; | ||
| titleParent.insertBefore( subtitleEl, titleEl.nextSibling ); | ||
| } |
|
🎉 This PR is included in version 2.20.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
A new alpha release.