Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 5 additions & 37 deletions css/civicrm.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ input.crm-form-checkbox + label {

.crm-container th,
.crm-container table.display thead th,
.crm-container table thead.sticky th,
.crm-container table.caseSelector tr.columnheader th {
background-color: #fff;
border-color: #fff #fff #cfcec3;
Expand All @@ -136,37 +135,17 @@ input.crm-form-checkbox + label {
vertical-align: top;
}
/* Styles for Sticky Header */
.crm-sticky thead > tr > th,
.crm-container table thead.sticky > tr > th {
background-color: #fff;
}

.crm-sticky thead,
.crm-container table thead.sticky {
border-bottom: 2px solid #cfcec3;
background-color: #fff;
z-index: 10;
position: sticky;
table.crm-sticky-header > thead > tr {
position: sticky !important;
top: var(--crm-menubar-bottom, 0);
box-shadow: 0 2px 2px -1px #cfcec3;
}

@media (max-width: 782px) {
/** WP **/
.wp-admin .crm-sticky thead {
top: 48px;
}
/** Drupal **/
.path-civicrm.crm-menu-visible {
top: 39px;
}
z-index: 2;
}

/* Styles for Sorting Header */
.crm-container table thead th.sorting_asc,
.crm-container table thead th.sorting_desc,
.crm-container table .sticky th a.sort-ascending,
.crm-container table .sticky th a.sort-descending,
.crm-container table thead th a.sort-ascending,
.crm-container table thead th a.sort-descending,
.crm-container table.caseSelector tr.columnheader th a.sort-ascending,
.crm-container table.caseSelector tr.columnheader th a.sort-descending {
color: #3e3e3e;
Expand Down Expand Up @@ -435,17 +414,6 @@ input.crm-form-entityref {
margin-bottom: 1em;
}

@media (min-width:1079px) {
.wp-toolbar {
--crm-sticky-top: 80px;
}
.wp-toolbar .crm-menubar-above-cms-menu,
.wp-toolbar .crm-menubar-below-cms-menu {
--crm-sticky-top: 112px;
}

}

/* todo: See PR#19968 to move towards configurable breakpoints */
@media (min-width: 480px) {
.crm-container .crm-section .label {
Expand Down
4 changes: 2 additions & 2 deletions ext/civigrant/templates/CRM/Grant/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{/if}

{strip}
<table class="selector row-highlight">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header">
<thead>
<tr>
{if ! $single and $context eq 'Search'}
<th scope="col" title="{ts escape='htmlattribute'}Select rows{/ts}">{$form.toggleSelect.html}</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
{/if}

{strip}
<table class="selector row-highlight" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<tr>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
{include file="CRM/common/pagerAToZ.tpl"}

{strip}
<table summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
{if ($header.sort eq 'activity_id') or ($header.sort eq 'case_id')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
{/if}

{strip}
<table class="selector row-highlight" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
<th scope="col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
{/if}

{strip}
<table class="selector row-highlight" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<tr>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
{include file="CRM/common/pagerAToZ.tpl"}

{strip}
<table summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
{foreach from=$columnHeaders item=header}
<th scope="col">
{if $header.sort}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
{include file="CRM/common/pagerAToZ.tpl"}

{strip}
<table class="selector row-highlight" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
<th scope="col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
{/if}

{strip}
<table class="selector row-highlight" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header" summary="{ts escape='htmlattribute'}Search results listings.{/ts}">
<thead>
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
{foreach from=$columnHeaders item=header}
<th scope="col">
Expand Down
3 changes: 0 additions & 3 deletions ext/riverlea/core/css/_cms.css
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ body.wp-admin .crm-container input[type="radio"]:checked {
body.wp-admin .crm-container input[type="radio"] {
border-radius: 50%;
}
body.wp-admin .crm-sticky thead {
--crm-menubar-bottom: 48px;
}

/******************
STANDALONE
Expand Down
15 changes: 3 additions & 12 deletions ext/riverlea/core/css/components/_tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
background-color: var(--crm-table-header-bg-color);
}
.crm-container th,
.crm-container table thead.sticky th,
.crm-container table.dataTable thead th,
.crm-container tr.columnheader td {
background-color: var(--crm-table-header-bg-color);
Expand Down Expand Up @@ -82,18 +81,10 @@
}

/* Sticky header */
.crm-sticky thead > tr > th,
.crm-container table thead.sticky > tr > th {
background-color: var(--crm-table-header-bg-color);
}
.crm-sticky thead,
.crm-container table thead.sticky {
border-bottom: 2px solid #cfcec3;
background-color: var(--crm-table-header-bg-color);
z-index: 10;
position: sticky;
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;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}
}


/* Data Tables */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
Forked on 19 July 24. Called on SearchKit Admin pages
Status: merged */

table.crm-sticky-header > thead > tr {
position: sticky !important;
top: var(--crm-menubar-bottom, 0);
z-index: 2;
}
.crm-search-display-table > table.table > thead > tr > th.crm-search-result-select {
padding-inline: var(--crm-l-medium);
text-transform: none;
Expand Down
6 changes: 0 additions & 6 deletions ext/search_kit/css/crmSearchDisplayTable.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
font-weight: bold;
}

table.crm-sticky-header > thead > tr {
position: sticky !important;
top: var(--crm-menubar-bottom, 0);
z-index: 2;
}

/* Nested styling for hierarchical rows */
#bootstrap-theme .crm-search-display-table tr td.crm-hierarchical-row {
position: relative;
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/ACL/Form/WordPress/Permissions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<p>{ts}Use this form to Grant access to CiviCRM components and other CiviCRM permissions to WordPress roles.{/ts}</p>
<p>{ts}<strong>NOTE: Super Admin</strong> and <strong>Administrator</strong> roles will have all permissions in CiviCRM.{/ts}</p>
</div>
<div class="crm-block crm-sticky">
<table class="table-striped">
<div class="crm-block">
<table class="table-striped crm-sticky-header">
<thead>
<tr>
<th class="label">&nbsp;</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Activity/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{/if}

{strip}
<table class="selector row-highlight">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header">
<thead>
<tr>
{if !$single and $context eq 'Search'}
<th scope="col" title="{ts escape='htmlattribute'}Select rows{/ts}">{$form.toggleSelect.html}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Activity/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{ts}Update field values for each Activities as needed. Click <strong>Update Activities</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first Activity and then click the <strong>Copy icon</strong> (next to the column title).{/ts}
</div>
<div class="crm-submit-buttons">{if $fields}{$form._qf_Batch_refresh.html}{/if}{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
<table class="crm-copy-fields">
<thead class="sticky">
<table class="crm-copy-fields crm-sticky-header">
<thead>
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
<th>{$fTitle}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Admin/Page/MailSettings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div class="form-item">
{strip}
{include file="CRM/common/enableDisableApi.tpl"}
<table cellpadding="0" cellspacing="0" border="0" class="selector row-highlight">
<thead class="sticky">
<table cellpadding="0" cellspacing="0" border="0" class="selector row-highlight crm-sticky-header">
<thead>
<th>{ts}Name{/ts}</th>
<th>{ts}Server{/ts}</th>
<th>{ts}Username{/ts}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Admin/Page/ParticipantStatusType.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
<table cellpadding="0" cellspacing="0" border="0" class="row-highlight">
<thead class="sticky">
<table cellpadding="0" cellspacing="0" border="0" class="row-highlight crm-sticky-header">
<thead>
<th>{ts}Label{/ts}</th>
<th>{ts}Name (Status ID){/ts}</th>
<th>{ts}Class{/ts}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Campaign/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{/if}

{strip}
<table class="selector row-highlight">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header">
<thead>
<tr>
{if !$single and $context eq 'Search'}
<th scope="col" title="{ts escape='htmlattribute'}Select rows{/ts}">{$form.toggleSelect.html}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contact/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*}
{include file="CRM/common/pager.tpl" location="top"}
{include file="CRM/common/pagerAToZ.tpl"}
<table summary="{ts escape='htmlattribute'}Search results listings.{/ts}" class="selector row-highlight">
<thead class="sticky">
<table summary="{ts escape='htmlattribute'}Search results listings.{/ts}" class="selector row-highlight crm-sticky-header">
<thead>
<tr>
<th scope="col" title="{ts escape='htmlattribute'}Select rows{/ts}">{$form.toggleSelect.html}</th>
{if $context eq 'smog'}
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contact/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="help">
{ts}Update field values for each contact as needed. Click <strong>Update Contacts</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first contact and then click the <strong>Copy icon</strong> (next to the column title).{/ts}
</div>
<table class="crm-copy-fields">
<thead class="sticky">
<table class="crm-copy-fields crm-sticky-header">
<thead>
<tr class="columnheader">
<td>{ts}Name{/ts}</td>
{foreach from=$fields item=field key=fieldName}
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contribute/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

{strip}
<div class="crm-contact-contribute-contributions">
<table class="selector row-highlight">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header">
<thead>
<tr>
<th scope="col"></th>
{if !$single and $context eq 'Search'}
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contribute/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<div class="help">
{ts}Update field values for each contribution as needed. Click <strong>Update Contributions</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first contribution and then click the <strong>Copy icon</strong> (next to the column title).{/ts}
</div>
<table class="crm-copy-fields">
<thead class="sticky">
<table class="crm-copy-fields crm-sticky-header">
<thead>
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
<th>{$fTitle}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Core/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div class="crm-submit-buttons">
{if $fields}{$form._qf_Batch_refresh.html}{/if} &nbsp;{include file="CRM/common/formButtons.tpl" location="top"}
</div>
<table class="crm-copy-fields">
<thead class="sticky">
<table class="crm-copy-fields crm-sticky-header">
<thead>
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
<th>{$fTitle}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Event/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{/if}

{strip}
<table class="selector row-highlight">
<thead class="sticky">
<table class="selector row-highlight crm-sticky-header">
<thead>
<tr>
{if ! $single and $context eq 'Search'}
<th scope="col" title="{ts escape='htmlattribute'}Select rows{/ts}">{$form.toggleSelect.html}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Event/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
{/if}
<p>{ts}Click <strong>Update Participant(s)</strong> below to save all your changes.{/ts}</p>
</div>
<table class="crm-copy-fields">
<thead class="sticky">
<table class="crm-copy-fields crm-sticky-header">
<thead>
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
<td>{$fTitle}</td>
Expand Down
6 changes: 3 additions & 3 deletions templates/CRM/Financial/Page/BatchTransaction.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*}

<div id="enableDisableStatusMsg" class="crm-container" style="display:none;"></div>
<table id="batch-summary" cellpadding="0" cellspacing="0" border="0" class="report crm-batch_summary">
<thead class="sticky">
<table id="batch-summary" cellpadding="0" cellspacing="0" border="0" class="report crm-batch_summary crm-sticky-header">
<thead>
<tr>
{foreach from=$columnHeaders item=head}
<th>{$head}</th>
Expand All @@ -36,7 +36,7 @@
<p></p>
<div class="form-item">
{strip}
<table id="crm-transaction-selector-remove-{$entityID}" cellpadding="0" cellspacing="0" border="0">
<table class="crm-sticky-header" id="crm-transaction-selector-remove-{$entityID}" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th class="crm-transaction-checkbox">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.toggleSelects.html}{/if}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Financial/Page/FinancialAccount.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
<table id="crm-financial_accounts" class="display">
<thead class="sticky">
<table id="crm-financial_accounts" class="display crm-sticky-header">
<thead>
<th>{ts}Name{/ts}</th>
<th>{ts}Description{/ts}</th>
<th>{ts}Acctg Code{/ts}</th>
Expand Down
Loading