Repository navigation
Description
Summary
CPT archive Content Padding can fail to apply when Bottom is set to 50px and Top, Right, and Left remain blank. The configured bottom spacing is expected to apply without requiring values in unrelated fields. The customer reports that entering explicit zeros in the remaining fields makes the spacing work, preventing reliable use of partially filled padding controls.
Customer context
Product / area: Neve theme with Neve Pro CPT archive Content Padding.
Version: Customer versions not provided; defect present in inspected Neve HEAD and release tag v4.2.19.
Environment: Customized Neve child theme; desktop archive preview shown.
Reported symptom: Bottom-only padding fails with other fields blank; explicit 0 / 0 / 50 / 0 works.
Impact: Archive spacing cannot be configured reliably using partially filled fields. The ticket screenshot shows the working explicit-zero configuration.
Reproduction notes
- Enable Neve Pro custom archive layout controls for a CPT and open its archive preview.
- In Content Padding, select px and set Bottom to 50 while leaving Top, Right, and Left blank.
- Observe the reported missing bottom spacing; compare with the published archive after saving.
- Enter 0 in the other three fields and compare; the customer reports that this applies the intended spacing.
Source-confirmed, not runtime-reproduced. The supplied screenshot shows step 4. Exact installed versions were not provided.
Diagnosis
Conclusion
Confirmed by source inspection. The archive padding formatter retains blank sides and appends the selected unit to each side. With Top/Right/Left blank and Bottom 50, the px path produces --padding:px px 50px px;. That token sequence cannot supply a valid CSS padding value. Explicit zeros instead produce --padding:0px 0px 50px 0px;, matching the reported workaround. The defect remains in release tag v4.2.19 and inspected HEAD ab4ff1ccc.
Where this likely occurs
inc/core/styles/frontend.php—Frontend::setup_blog_card_style()lines 277–299, 329: registers the responsive--paddingformatter on.nv-index-posts; its populated-value check does not normalize the other blank sides before formatting.inc/core/styles/dynamic_selector.php—Dynamic_Selector::get_value()lines 169–195 andDynamic_Selector::__toString()lines 214–226: selects the device's spacing array and passes it to the property transformer.inc/core/styles/css_prop.php—Css_Prop::transform()lines 73–84: invokes the custom formatter before generic directional handling.Css_Prop::get_unit_responsive()lines 29–38 obtains the selected unit.assets/scss/components/elements/blog/_blogpost-grid.scss—.layout-grid .article-content-colrule lines 13–19: consumesvar(--padding, 0)as padding.- Neve Pro companion:
includes/modules/post_type_enhancements/views/blog_pro_cpt_view.php—Blog_Pro_CPT_View::register_dynamic_theme_mods()lines 58–60, 117–126: substitutes the CPT archive padding setting into the theme's blog-padding setting when the custom archive layout is enabled. - Neve Pro companion:
includes/modules/post_type_enhancements/customizer/blog_pro_cpt.php—Blog_Pro_CPT::add_blog_pro_layout_controls()lines 339–381: exposes responsive Content Padding with blank-side defaults and px/em/rem units.
Engineering notes
The defect is in the shared Neve theme formatter; Neve Pro supplies the CPT-specific values. header-footer-grid/Traits/Core.php — Core::sanitize_spacing_array() lines 130–135 preserves array input, so blank fields are not converted to zeros by this sanitizer. Resetting to blank defaults is not independently confirmed as broken. Git blame and git show identify commit 2dc5d8ca66 as introducing the custom formatter in January 2025. A previously working released CPT configuration was not established, so regression status remains unconfirmed. No WordPress core internals are asserted as locally verified.
Test coverage status
No relevant coverage was found during inspection of the Neve PHP tests or the Neve and Neve Pro e2e tests for partially blank Content Padding. An isolated PHP execution was attempted but could not run because the PHP executable is unavailable. No WordPress/browser reproduction was performed.
What to verify or explore next
- Reproduce desktop CPT archive padding with Bottom
50, other sides blank, and px selected; compare published output with the Customizer preview. - Compare generated CSS and computed padding for blank sides versus explicit zeros.
- Check tablet/mobile values, all-blank defaults, and em/rem selections.
- Verify the same partially filled setting in the regular Blog archive, which uses the shared formatter.
Unknowns / follow-up
Exact customer theme/plugin versions and child-theme overrides are unavailable. The screenshot confirms the working zero-filled state, not the failing blank-filled state. Browser-computed styles and the Customizer live-refresh path remain unverified.
Confidence
Confidence: 96/100
The reachable CPT-to-theme settings path and formatter directly explain the blank-versus-zero difference, and the faulty formatter persists in the latest inspected release.
Source: HelpScout #3511107651
Generated by bug-report-triage (ID: bug-report-triage_6af5f0b9a836f7.33619047)
Activity