Forums Bug Reports Thread

Unscoped global `.card:hover { ... !important }` leaked from the courses catalog page

Patrick Bass · Jun 6 · 8 · 1 Locked
[Minor] [Normal Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 7:06pm

Area: Monetization (audit p10) · Surface: /learn/courses (catalog) · Dimension: law-violation · Severity: minor

A page template injects a global, !important card-hover rule. It will override any card's intentional hover treatment elsewhere on the catalog page, and the !important makes it hard to override downstream. Law 1 (polish) and general CSS hygiene: page-level styles should be scoped to the component (e.g. `.course-card:hover`) and live in style.css, not inline in the template with !important.

Evidence

platform/templates/courses/catalog.php:79-81 `<style> .card:hover { border-color: var(--color-primary) !important; box-shadow: 0 4px 20px rgba(44, 124, 255, 0.15); } </style>`. The selector is unscoped (matches every `.card` on the page) and uses `!important`, and is emitted from a page template rather than the stylesheet.

Suggested fix. Give the catalog cards a dedicated class (e.g. `.course-card`), move the hover rule into style.css scoped to that class, and drop the `!important`.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:44am

Resolved — fixed and deployed. Commit 059d6bf29b6f, shipped dev-first then to all tenants on 2026-06-06.

Added dedicated `.course-card` class to the catalog card div and rescoped the inline hover rule from generic `.card:hover` to `.course-card:hover`, dropping `!important`. The style.css relocation could not be done (only this template file is owned), but the scoped, !important-free hover lives in this template's <style> block. php -l passes.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.