Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Generic link hover color overrides header cart icon color

已关闭
#4,643 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@HardeepAsrani 已经在做这个了。

开始于 2026年9月30日。

评估

这个 Issue 还没有评估数据。

描述

bug-report bug-report-triage customer report regression

Summary

The header cart icon does not retain its configured hover color after the recent Neve update. The cart link is expected to use its component --hovercolor value while hovered, but the inspected CSS cascade applies Neve's secondary accent instead. This prevents the cart component's color setting from determining the visible hover state and has led to a child-theme !important workaround.

Customer context

Product / area: Neve header cart component with Neve Pro styling active
Version: Exact installed versions were not provided; the relevant Neve change first shipped in 4.2.13 and remains in 4.2.14
Environment: WordPress frontend using WooCommerce and a child theme
Integration / third party: WooCommerce; Neve Pro Addon is present
Reported error / symptom: Cart icon hover color resolves to the Neve secondary accent rather than the component hover color
Impact: Configured cart styling is not reflected without a CSS specificity workaround

Reproduction notes

  1. Use Neve 4.2.13 or 4.2.14 with WooCommerce and a header cart component.
  2. Configure a cart hover color distinct from Neve's secondary accent.
  3. Hover the .cart-icon-wrapper link or focus it with the keyboard.
  4. Observe that the computed color comes from the generic Neve link-state rule rather than the cart component's configured hover value.

The customer supplied the conflicting selectors and reported that an !important child-theme override restores the desired state. A clean local runtime reproduction was not performed.

Diagnosis

Conclusion

This is a confirmed CSS-specificity regression. Neve 4.2.13 changed the generic hover/focus color selector from a:hover / a:focus to a:not([class*="button"]):hover / :focus. The resulting selector has greater specificity than .cart-icon-wrapper:hover, so the global secondary-accent color wins over the cart component's configured color. Commit 17a3c2e0da2446dd162acc4459ada710bbb91ed2 introduced the selector; tag comparison shows the lower-specificity behavior in 4.2.12 and the conflict in 4.2.13. No later typography change exists through 4.2.14.

Where this likely occurs
  • User-visible surface: WooCommerce cart component in the Neve header on hover and focus.
  • assets/scss/components/main/_typography.scss — global anchor state rules, approx. lines 52–60, selector a:not([class*="button"]): assigns --nv-secondary-accent with specificity above the cart rule.
  • assets/scss/components/compat/woocommerce/_nav-cart.scss — cart component styling, lines 6–12, selector .cart-icon-wrapper:hover: assigns --hovercolor with a fallback to --color but loses the cascade.
  • header-footer-grid/templates/components/component-cart-icon.php — cart component template, approx. line 52, emits the affected anchor with class cart-icon-wrapper.
  • Git history: commit 17a3c2e0d is contained in release tags 4.2.13 and 4.2.14; release 4.2.12 retains the lower-specificity generic anchor selector.
Engineering notes

The cart anchor class does not contain button, so it is inside the new global selector's scope. The inspected conflict is deterministic from the emitted selectors: the global rule has specificity (0,2,1), while the cart hover rule has (0,2,0). The cart SVG inherits the anchor's currentColor through the component styling path. The defect is routed to Neve because both the regression-producing global selector and the cart component's intended hover rule are in the theme repository.

Test coverage status

tests/test-neve-cart-guards.php checks cart rendering guards and the presence of cart-icon-wrapper, but not computed styling. The Neve Pro WooCommerce Booster e2e suites cover cart behavior, while the searched Neve and Pro suites contain no computed hover-color assertion for cart-icon-wrapper. No relevant color-state coverage was found during inspection.

What to verify or explore next
  • Reproduce with Neve 4.2.14 by assigning distinct secondary-accent and cart hover colors, then inspect the cart link's computed color during hover and keyboard focus.
  • Compare the same WooCommerce header configuration under Neve 4.2.12 and 4.2.13 to validate the identified release boundary at runtime.
  • Run the Neve cart guard test and relevant WooCommerce Booster Playwright suites after exercising the computed hover/focus color path.
Unknowns / follow-up

The customer's exact Neve, Neve Pro, and WooCommerce versions were not stated. Runtime reproduction was not performed, but the reported selectors and deterministic cascade match the inspected released source.

Confidence

Confidence: 98/100

Repository inspection confirms that Neve 4.2.13 increased the generic link-state selector's specificity above both affected header-component selectors, and the regression remains in 4.2.14. No matching open GitHub issue was found for either independently testable symptom.


Source: HelpScout #3466631245
Generated by bug-report-triage (ID: bug-report-triage_6abbeeb198c984.22566267)

主要语言
PHP
星标
307
派生
88
平均合并
2 天 21 小时
30 天内合并 PR
15

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Codeinwp/neve 的其他 Issue

查看 Codeinwp/neve 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。