Skip to content

Instantly share code, notes, and snippets.

@dmd
Created February 5, 2026 13:49
Show Gist options
  • Select an option

  • Save dmd/e546d360422ddfa53fc71e7ee17b6519 to your computer and use it in GitHub Desktop.

Select an option

Save dmd/e546d360422ddfa53fc71e7ee17b6519 to your computer and use it in GitHub Desktop.
/**
* Booked Scheduler Custom CSS
*
* expects a Slot Label for P1/P2 of the form:
<span class=title>{title}</span>
<span class=lab>{att1}</span>
<span class=event-description>{description}</span>
<span class=ptsource>{att11}</span>
<span class=bodypart>{att17}</span>
<span class=scannedperson>{att2}</span>
<span class=invitees>{invitees}</span>
<span class=participants>{participants}</span>
<span class=booker>{name}</span>
<span class=contrast>{att3}</span>
<span class=showme>{att4}</span>
*
* and for Coverage of the form:
<span class=coveragetype>{att7}</span>
<span class=event-description>{description}</span>
<span class=invitees>{invitees}</span>
<span class=participants>{participants}</span>
<span class=allday>{att8}</span>
* and for staff of the form:
<span class=staffloc>{att6}</span>
<span class=invitees>{invitees}</span>
<span class=participants>{participants}</span>
<span class=booker>{name}</span>
<span class=showme>{att4}</span>
* NOTE: Uses :is(tr.slots, tr:has(.reservations)) to support both desktop and mobile views.
* Desktop uses tr.slots, mobile uses tr without class but with .reservations div inside.
*/
/* Hide the schedule display style dropdown */
#schedule-actions .btn-group:has(#schedule-display-toggle) {
display: none !important;
}
/* hide Email, Phone, and Organization from user list */
/* Hide Email column (3rd) */
#userList thead th:nth-child(3),
#userList tbody td:nth-child(3) {
display: none;
}
/* Hide Phone column (4th) */
#userList thead th:nth-child(4),
#userList tbody td:nth-child(4) {
display: none;
}
/* Hide Organization column (5th) */
#userList thead th:nth-child(5),
#userList tbody td:nth-child(5) {
display: none;
}
/* ===== RESERVATION FORM ===== */
/* Hide entire times section when "All Day" checkbox is checked */
body:has(#attribute-8:checked) #reservation-times-section {
display: none !important;
}
/* ===== COVERAGE ROW (rid=6) ===== */
/* Hide time for "all day" coverage events (when allday span has content) */
.reserved:has(.allday:not(:empty)) > span:first-child:not([class]) {
display: none !important;
}
/* Always hide the allday span (it's just a flag) */
:is(tr.slots, tr:has(.reservations)) .allday {
display: none !important;
}
/* Coverage type - bold */
:is(tr.slots, tr:has(.reservations)) .coveragetype {
display: block !important;
font-weight: bold !important;
}
/* Show title and description for Coverage */
:is(tr.slots, tr):has([data-resourceid="6"]) .title,
:is(tr.slots, tr):has([data-resourceid="6"]) .event-description {
display: block !important;
}
/* Hide booker for Coverage (override showme logic) */
:is(tr.slots, tr):has([data-resourceid="6"]) .booker {
display: none !important;
}
/* Larger description and participants for Coverage */
:is(tr.slots, tr):has([data-resourceid="6"]) .event-description {
font-size: 13px !important;
}
:is(tr.slots, tr):has([data-resourceid="6"]) .participants {
font-size: 13px !important;
}
/* ===== NOTICES ROW (rid=2) ===== */
/* Hide the time span (first span without a class) */
:is(tr.slots, tr):has([data-resourceid="2"]) .reserved.condensed-event > span:first-child:not([class]) {
display: none !important;
}
/* Notice title - inline and bold */
:is(tr.slots, tr):has([data-resourceid="2"]) .notice-title {
display: inline !important;
font-weight: bold !important;
}
/* Notice description - preserves line breaks */
:is(tr.slots, tr):has([data-resourceid="2"]) .notice-description {
display: inline !important;
white-space: pre-line !important;
}
/* ===== STAFF ROW (rid=3) ===== */
/* Hide title and description for Staff */
:is(tr.slots, tr):has([data-resourceid="3"]) .title,
:is(tr.slots, tr):has([data-resourceid="3"]) .event-description {
display: none !important;
}
/* Larger participants for Staff */
:is(tr.slots, tr):has([data-resourceid="3"]) .participants,
:is(tr.slots, tr):has([data-resourceid="3"]) .invitees {
font-size: 13px !important;
}
/* ptsource - bold italic */
:is(tr.slots, tr):has([data-resourceid="3"]) .staffloc {
font-weight: bold !important;
font-style: italic !important;
}
/* initials (via custom-js.js) all on one line */
:is(tr.slots, tr):has([data-resourceid="3"]) .invitees,
:is(tr.slots, tr):has([data-resourceid="3"]) .participants,
:is(tr.slots, tr):has([data-resourceid="3"]) .staffloc {
display: inline-block !important;
margin-right: 0.5ch;
}
/* ===== ALL ROWS - EVENT FIELDS ===== */
/* Make all event field spans appear on separate lines */
/* Empty spans automatically don't take up space */
:is(tr.slots, tr:has(.reservations)) .title,
:is(tr.slots, tr:has(.reservations)) .lab,
:is(tr.slots, tr:has(.reservations)) .event-description,
:is(tr.slots, tr:has(.reservations)) .scannedperson,
:is(tr.slots, tr:has(.reservations)) .invitees,
:is(tr.slots, tr:has(.reservations)) .participants,
:is(tr.slots, tr:has(.reservations)) .contrast {
display: block !important;
}
/* Event description preserves line breaks */
:is(tr.slots, tr:has(.reservations)) .event-description {
white-space: pre-line !important;
}
/* ===== DISTINCT FORMATTING FOR QUICK SCANNING ===== */
/* Lab name - bold, larger, uppercase, wider letter spacing */
:is(tr.slots, tr:has(.reservations)) .lab {
font-weight: bold !important;
font-size: 11px !important;
text-transform: uppercase !important;
letter-spacing: 0.5px !important;
}
/* Title - bold, uppercase */
:is(tr.slots, tr:has(.reservations)) .title {
font-weight: bold !important;
text-transform: uppercase !important;
font-size: 14px !important;
}
/* Description - smaller, italic, normal weight */
:is(tr.slots, tr:has(.reservations)) .event-description {
font-size: 10px !important;
font-style: italic !important;
font-weight: normal !important;
}
/* scannedperson - semi-bold with tight rounded box */
:is(tr.slots, tr:has(.reservations)) .scannedperson {
font-weight: 600 !important;
}
:is(tr.slots, tr:has(.reservations)) .scannedperson:not(:empty) {
border: 1px solid currentColor !important;
border-radius: 3px !important;
padding: 0px 3px !important;
display: inline-block !important;
line-height: 1.2 !important;
}
/* Invitees and Participants - medium weight, slightly smaller */
/* disabling markers until we activate this feature
:is(tr.slots, tr:has(.reservations)) .invitees:not(:empty)::before {
content: "? " !important;
opacity: 0.7 !important;
}
:is(tr.slots, tr:has(.reservations)) .participants:not(:empty)::before {
content: "✓ " !important;
}
*/
:is(tr.slots, tr:has(.reservations)) .invitees,
:is(tr.slots, tr:has(.reservations)) .participants {
font-weight: 500 !important;
font-size: 10.5px !important;
}
/* Contrast - replace '1' with word 'contrast' in italics */
:is(tr.slots, tr:has(.reservations)) .contrast {
font-size: 0 !important; /* Hide the '1' */
}
:is(tr.slots, tr:has(.reservations)) .contrast:not(:empty)::before {
content: "◐ contrast" !important;
display: block !important;
font-size: 10.5px !important;
}
/* Booker - styled like participants, shown only when showme has content */
.reserved .booker {
display: none !important;
}
.reserved:has(.showme:not(:empty)) .booker {
display: block !important;
font-weight: 500 !important;
font-size: 10.5px !important;
}
.reserved:has(.showme:not(:empty)) .booker:not(:empty)::before {
content: "✓ " !important;
}
/* Hide the showme span (used as a flag to control booker visibility) */
:is(tr.slots, tr:has(.reservations)) .showme {
display: none !important;
}
/* bodypart - blue text on white, matching scannedperson box styling */
:is(tr.slots, tr:has(.reservations)) .bodypart:not(:empty) {
color: rgb(69, 142, 247) !important;
background-color: white !important;
border: 1px solid currentcolor !important;
border-radius: 3px !important;
padding: 0px 3px !important;
display: inline-block !important;
line-height: 1.2 !important;
}
/* ptsource - bold italic */
:is(tr.slots, tr:has(.reservations)) .ptsource {
font-weight: bold !important;
font-style: italic !important;
}
/* ===== TODAY COLUMN HIGHLIGHT ===== */
/* Highlight today's column with colored borders */
table.reservations td.today-column {
border-left: 2px solid #ff6600;
border-right: 2px solid #ff6600;
}
/* Remove left border from cell after today column to avoid double border */
table.reservations td.today-column + td {
border-left: none !important;
}
/* Highlight today's header cell with colored borders */
table.reservations th.today {
border-left: 2px solid #ff6600 !important;
border-right: 2px solid #ff6600 !important;
}
/* Remove left border from cell after today header to avoid double border */
table.reservations th.today + th {
border-left: none !important;
}
/* ===== HIDE LEGEND SECTION ===== */
/* Hide the legend section (Open, Blocked, Reserved, etc.) and its toggle button */
div.center:has(div.legend) {
display: none !important;
}
/* ===== HIDE PRINT ICON AND SCHEDULE TITLE ===== */
/* Hide the print button */
#print_schedule {
display: none !important;
}
/* Hide the "McLean Imaging Center" title */
.schedule_title {
display: none !important;
}
/* Position filter button on the same line as navigation */
#restore-sidebar-container {
position: fixed !important;
top: 70px !important;
left: 15px !important;
z-index: 1000;
}
#restore-sidebar {
display: block !important;
padding: 0.25rem 0.5rem !important;
}
/* ===== SCHEDULE DATE NAVIGATION - CENTERED ON ONE LINE ===== */
/* Make schedule-dates full width and centered */
.schedule-dates.col-lg-3 {
flex: 0 0 100% !important;
width: 100% !important;
max-width: 100% !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
gap: 0.5rem;
order: 4 !important;
}
/* Make both child divs inline */
.schedule-dates > div {
display: inline-flex !important;
align-items: center !important;
white-space: nowrap;
}
/* Tighten up the button spacing */
.schedule-dates .btn-link {
padding-left: 0.25rem;
padding-right: 0.25rem;
}
/* ===== HIDE FILTER FIELDS: MINIMUM CAPACITY + RESOURCE TYPE ===== */
#resettable .col-sm-12:has(> #maxCapacity),
#resettable .col-sm-12:has(> #resourceType) {
display: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment