Repository navigation
Conversation
Removes `.sticky` (broken, used D7 js) and `crm-sticky` (only used once) in favor of the `crm-sticky-header` class, moving it out of SearchKit and into core+riverlea.
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
PR commands & links...
|
civireview
left a comment
There was a problem hiding this comment.
CiviReview: 🟢 Ready · Confidence: 5/5 ★★★★★
Summary: Consolidates three sticky-header CSS classes into
.crm-sticky-header. It moves the rule out of SearchKit into core and Riverlea, and switches about 35 core and legacy-search templates fromthead.stickyto a table-level class.Merge Confidence (5/5): No verified issues; passed CI / Jenkins, Base-Test Regression, Live Surface Diff.
- PR:
civicrm/civicrm-core#38215· Kind:ui-change· Commits:a6349c8→c5c2a06
Findings
No verified high-signal issues found above the confidence gate.
Empirical Verification Matrix
| Check | Status | Detail |
|---|---|---|
| CI / Jenkins | ✅ PASS | 1 CI checks: 1 passed, 0 failed, 0 pending. |
| Base-Test Regression | ✅ PASS | 145 test(s) passed on A and B |
| Live Surface Diff | ✅ PASS | Live APIv4/APIv3/routes/Afform surface diff captured with 0 risk flags. |
| Browser A/B (Standalone) | ✅ PASS | Probed 1 route(s), 1 screenshot pair(s); 0 new console/page/network/a11y/render regressions. |
Not Verified:
- No added/modified PHPUnit tests in PR; Proof-of-Fix A/B test skipped.
Standalone Browser A/B (1 route(s), 0 regressions)
- Probed routes (1):
civicrm/dashboard?reset=1 - New console errors: 0 · Page errors: 0 · Network failures: 0 · A11y violations: 0 · Render regressions: 0
- Screenshots: 1 before/after pair(s) captured
Detailed Walkthrough (7 notes)
- CONFIRMED (diff):
table.crm-sticky-header > thead > tr(sticky, top: var(--crm-menubar-bottom,0), z-index 2) is added to css/civicrm.css and Riverlea _tables.css. It is removed from search_kit and the Riverlea search_kit css. The.sticky,.crm-stickyand WP-toolbar rules are deleted. - CONFIRMED: about 35 templates move the class from
<thead class="sticky">to<table class="... crm-sticky-header">. The class is applied to the table, not the thead, matching the new selector. - CONFIRMED: The sticky rule now sits in core CSS, so it applies to every table with
crm-sticky-header, and so doesposition: sticky !important. - PROVEN: Only the CI A/B PHPUnit run (145 tests) and a dashboard probe ran. Neither exercises any template touched by this PR. The probe showed no console errors or visual regressions on the one route it visited.
- NEEDS_QUESTION: Several tables have multiple
<thead>elements (DeferredRevenue, Report Layout Table) or no<tr>in thead (many<thead><th>templates). Sticky rows may behave oddly, or not apply, where thead has bare th elements without a tr. - NEEDS_QUESTION: The old sticky rule gave headers a background, border and shadow. The new rule sets none, so rows could turn transparent over scrolling content outside Riverlea. Sticky position may also fail inside overflow containers, and DataTables-wrapped tables may behave differently.
- NOT VERIFIED: Visual behaviour under WordPress, Drupal, Joomla, Standalone and Riverlea, and the mobile menubar offset, whose WP-specific rules were removed. Extensions in
universethat use.stickylose their (already broken) styling.
CiviCRM Core Standards (4 checks — all PASS/N/A)
| Code | Status | Note |
|---|---|---|
r-explain |
PASS | The PR body explains the three classes and why they are being consolidated. |
r-tech |
PASS | Removing .sticky and .crm-sticky changes a public CSS class contract, but the PR body states this and gives the reasoning: the old class was non-functional, and crm-sticky-header is the replacement. One small surviving UI finding (c1) affects the DeferredRevenue template only. It is not a technical-standards breach. |
r-run |
PASS | CI passed. The browser A/B run probed only the dashboard, so the sticky-header pages were not exercised and the overlap in c1 was not checked live. |
r-user |
PASS | Extensions can adopt crm-sticky-header as the replacement. One minor visual issue remains in the Deferred Revenue report (c1). |
Ecosystem Blast Radius
| Repo | Path | Symbol | Impact |
|---|---|---|---|
| civicrm-core | css/civicrm.css |
.crm-sticky-header / .sticky / .crm-sticky |
The old .sticky and .crm-sticky rules are removed. The .crm-sticky-header rule is now global rather than SearchKit-only. |
| civicrm-core | ext/riverlea/core/css/components/_tables.css |
table.crm-sticky-header |
Riverlea now gets the sticky rule from this file, replacing the one in the SearchKit stylesheet fork. |
Reviewed by civireview · sonnet-opus · 314,083 tokens · $0.57
It's actually simpler than it looks. |
But in many more parts of Civi? As the not-working .sticky is being swapped with the working .crm-sticky-header? Tho true, the main job is cross-CMS testing, not checking all the template outputs. |
|
@vingle here's a quick screencap of this PR on Wordpress, including adjusting the window width to make the menubar wrap: Screen.Recording.2026-11-25.at.1.22.26.PM.movIs that the testing you'd like to see on every CMS? |
@colemanw - good point! I'd not even been thinking of wrapping menu lines… there's also the issue of mobile view. I'd just been thinking menu above and menu below… ie
&
So to be really thorough we'd need both of these with wrapping menu lines… And the mobile viewport, which on my quick tests is really broken (
ie 5 scenarios on each cms (menu above single line & wrapping line, menu below single & wrapping, mobile). |
|
retest this please |
|
retest this for wordpress please build wordpress (sorry can't remember the command) |
|
Joomla testing: This line: civicrm-core/ext/riverlea/core/css/joomla.css Lines 90 to 93 in f2fba12 body.crm-menubar-over-cms-menu. The sticky table header vanishes behind the civi menu.
I'd suggest changing that line to This also works with wrapping menu items. |
| table.crm-sticky-header > thead > tr { | ||
| position: sticky !important; | ||
| top: var(--crm-menubar-bottom, 0); | ||
| box-shadow: 0 2px 2px -1px #cfcec3; | ||
| z-index: 2; | ||
| } |
There was a problem hiding this comment.
this is breaking the tables at viewports < 769px on all CMSs. Wrapping this in a media query should fix it. ie
@media (min-width: 768px) {
table.crm-sticky-header > thead > tr {
position: sticky !important;
etc
}
}
…ixed Prevents bogus --crm-menubar-bottom offsets on mobile viewports (where #civicrm-menu is hidden/vertical), when the menubar is hidden during resize, and when the menubar uses position: absolute (such as Joomla 4/5 below-cms-menu and Backdrop absolute admin bar). Removes the now-redundant Joomla Riverlea override that was breaking over-cms-menu. Co-authored-by: Antigravity (Gemini) — reviewed PR feedback and implemented fix
Wraps table.crm-sticky-header sticky rules in @media (min-width: 768px) in both Riverlea and core CSS to avoid conflicting with Riverlea's mobile responsive table layout (display: contents below 768px) and keep small viewports uncluttered. Co-authored-by: Antigravity (Gemini) — reviewed PR feedback and implemented fix
|
Thanks for the testing @vingle wrapping the sticky css in a media query is a good idea. I've done that. |






Overview
Gets us out of a sticky situation by consolidating 3 duplicate css rules.
See discussion at #38207
Technical Details
Over the years CiviCRM had accumulated 3 ways of making a sticky table header:
.stickyThe OG D6 javascript version.universe, BUT...crm-prefix (which is our standard).crm-sticky-headerThe one I added to SearchKit (2023). Now used in hundreds of SearchDisplays..crm-sticky@shaneonabike added this in 2024.crm-sticky-headerout of searchkit's css and into core.universe(the WP permission screen that Shane was working on)Given all that, the path seems pretty clear to me. This PR:
.crm-sticky-headercss from searchKit to core/Riverlea.crm-stickyand delete its css.stickybut given that it's been broken for years and no one's noticed, I'm updating all those tables to use.crm-sticky-headerand deleting the defunct css.Note: #38207 should have been closed instead of merged. It fixes the old
.stickyrule by switching it to css instead of D7 javascript... but again, it's been broken for years. Replacing it IMO is better than fixing it. It's been non-functional for extensions inuniverseusing that class, so ripping it out leaves it equally non-functional, but with an easy path forward for those extensions to adopt the new class.