Fixed transparent header retaining a shadow line - #4609
Conversation
The base .hfg_header.site-header box-shadow rule had no exception for the transparent header state, unlike the neighboring background/overlay rules on #header-grid.global-styled which already skip themselves via :not(.neve-transparent-header). Added the same guard to the box-shadow rule so a transparent header no longer shows a faint shadow line along its bottom edge.
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Pull request overview
Updates header styling to avoid applying a box-shadow when the Neve transparent header mode is active.
Changes:
- Restricts the
.hfg_header.site-headerbox-shadow rule to apply only when the header is not marked as transparent.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| .hfg_header.site-header { | ||
| .hfg_header.site-header:not(.neve-transparent-header) { | ||
| box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1); | ||
| } |
There was a problem hiding this comment.
Verified this isn't the case here: .neve-transparent-header is added directly onto the same header wrapper element (#header-grid) that also carries hfg_header and site-header — confirmed both on a live page's DOM (<div id="header-grid" class="hfg_header neve-transparent-header site-header">) and in neve-pro-addon's source, where add_class_to_header_wrapper() appends the class to that same wrapper's class list. So the selector correctly matches; no parent-qualified selector is needed.
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
Summary
.hfg_header.site-header { box-shadow: 0 -1px 3px rgba(0,0,0,.1); }in_general.scsshad no exception for the transparent header state, unlike the siblingbackground/::beforeoverlay rules on#header-grid.global-styled, which already skip themselves via:not(.neve-transparent-header).:not(.neve-transparent-header)guard to the box-shadow rule.Related issue
Codeinwp/neve-pro-addon#3254 — that issue's diagnosis pointed at the Pro addon's
_transparent-header.scsssticky/non-sticky branches, but on a live repro the Proheader_footer_gridstylesheet wasn't loaded at all (only its JS was enqueued). The shadow is applied unconditionally by this free-theme rule instead.Test plan