Skip to content

Commit

Permalink
Merge pull request #1 from vingle/thames-patch
Browse files Browse the repository at this point in the history
Adds AAA darkmode contrast ratios to Thames
  • Loading branch information
vingle authored Jan 24, 2025
2 parents 79f3825 + b902420 commit bad8c75
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
22 changes: 20 additions & 2 deletions ext/riverlea/streams/thames/css/_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
--crm-c-dkblue-02: #0c191e;
--crm-c-dkblue-03: #1a292f;
--crm-c-dkblue-04: #1e323b;
--crm-c-dkblue-08: #2ea4ff;
--crm-c-background: var(--crm-c-dkblue-02);
--crm-dash-tabs-bg: var(--crm-c-dkblue-03);
--crm-dash-tab-count-bg: var(--crm-c-blue-darker);
--crm-c-page-background: var(--crm-c-dkblue-01);
--crm-c-code-background: var(--crm-c-dkblue-04);
--crm-dashlet-bg: var(--crm-c-dkblue-02);
--crm-c-green: #335417;
--crm-c-link: #2c98ed;
--crm-c-link-hover: color-mix(in srgb, white, var(--crm-c-blue-dark) 70%);
--crm-c-link: var(--crm-c-dkblue-08);
--crm-c-link-hover: color-mix(in srgb, white, var(--crm-c-dkblue-08) 70%);
--crm-dash-header-col: var(--crm-c-blue-light);
--crm-dash-tab-bg-hover: var(--crm-c-dkblue-02);
--crm-dash-panel-bg: var(--crm-c-dkblue-02);
Expand Down Expand Up @@ -47,6 +48,12 @@
--crm-form-block-background: var(--crm-c-dkblue-02);
--crm-notify-background: var(--crm-c-dkblue-02);
--crm-expand-header-bg-active: var(--crm-c-dkblue-04);
--crm-checkbox-list-col: var(--crm-input-label-color);
--crm-input-description: var(--crm-input-label-color);
--crm-c-warning-text: black;
/* these colour descriptions are used prescriptively */
--crm-c-yellow-light: var(--crm-c-dkblue-01);
--crm-c-yellow-less-light: var(--crm-c-dkblue-02);
}

.crm-container div.crm-summary-row div.crm-label {
Expand Down Expand Up @@ -91,6 +98,7 @@
}
.crm-container summary {
background: var(--crm-c-dkblue-03);
color: var(--crm-expand-header-color);
}
.crm-container details {
background-color: var(--crm-c-dkblue-02);
Expand Down Expand Up @@ -121,3 +129,13 @@
.crm-container .status-warning {
--crm-c-alert: var(--crm-c-red);
}

#civicrm-footer a, nav.breadcrumb a {
--crm-c-link: var(--crm-c-dkblue-08);
--crm-c-link-hover: var(--crm-c-blue);
}

/* eg. Frontend theme selection */
.select2-drop.select2-drop-active.crm-container .select2-results > li {
--crm-c-blue-dark: var(--crm-c-blue);
}
14 changes: 11 additions & 3 deletions ext/riverlea/streams/thames/css/civicrm.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ html.cms-standalone body {
cursor: pointer; /* show it's clickable */
position: relative; /* so our animated triangle doesn't go walkies */
}
.crm-container summary:hover,
.crm-container summary:focus {
.crm-container summary:where(:hover, :focus) {
background-color: var(--crm-c-blue-overlay2);
}

Expand Down Expand Up @@ -601,7 +600,7 @@ html.crm-standalone nav.breadcrumb>ol {
.crm-container th.crm-search-result-select {
--crm-btn-margin: 0;
}
/* Searchkit accordions */
/* Searchkit accordions */
.crm-search-admin-edit-columns details,
.crm-search .crm-search-admin-relative details {
/*issue https://lab.civicrm.org/extensions/riverlea/-/issues/102 */
Expand All @@ -623,3 +622,12 @@ html.crm-standalone nav.breadcrumb>ol {
/* the hover state gives crm-c-red-dark to the background */
--crm-c-alert-text: var(--crm-c-red-light);
}

/* Fix Mosaico wizard */
.crm_wizard__title { --crm-panel-background: transparent; }
.crmb-wizard-button-right { gap: 1rem; }

/* Support contact dashboard image float */
.contactCardRight:has(#crm-contact-thumbnail) .float-left {
width: calc(100% - var(--crm-flex-gap) - var(--crm-dash-image-size));
}

0 comments on commit bad8c75

Please sign in to comment.