Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 17 additions & 9 deletions assets/css/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ header p.header-meta {
display: flex;
align-items: center;
margin-bottom: 8px;
cursor: pointer;
padding: 5px;
border-radius: 4px;
transition: background-color 0.2s;
}
Expand All @@ -381,13 +379,20 @@ header p.header-meta {
height: 16px;
}

/* The label wraps the checkbox and carries the padding, so the whole row that
shows the hover fill is clickable (2.5.8) */
.facet-option label {
padding-left: 8px;
padding: 5px;
cursor: pointer;
font-size: 14px;
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
}

.facet-name {
flex: 1;
}

.facet-count {
Expand Down Expand Up @@ -592,8 +597,11 @@ header p.header-meta {
color: var(--uoft-blue);
font-size: 13px;
cursor: pointer;
padding: 0;
margin-bottom: 15px;
/* Brings the hit area up to 24px (2.5.8) */
padding-block: 4px;
padding-inline: 0;
min-height: 24px;
margin-bottom: 11px;
font-weight: 600;
text-decoration: underline;
transition: color 0.2s;
Expand Down Expand Up @@ -621,9 +629,9 @@ header p.header-meta {
display: inline-block;
border: 1px solid var(--tag-neutral-edge);
font-family: inherit;
padding: 4px 10px;
padding: 6px 10px;
background-color: var(--tag-neutral-bg);
border-radius: 12px;
border-radius: 14px;
font-size: 12px;
color: var(--tag-neutral-text);
cursor: pointer;
Expand Down Expand Up @@ -974,10 +982,10 @@ header p.header-meta {

.facet-option {
margin-bottom: 6px;
padding: 3px;
}

.facet-option label {
padding: 3px;
font-size: 13px;
}

Expand Down
10 changes: 5 additions & 5 deletions assets/js/search/facets.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ function createFacets(facetKey, containerId) {
const id = escapeHTML(`${facetKey}-${value}`);
return `
<div class="facet-option ${isHidden}" data-facet-item="${facetKey}">
<input type="checkbox" id="${id}"
data-facet="${facetKey}"
data-value="${escapeHTML(value)}"
${isChecked ? 'checked' : ''}>
<label for="${id}">
<span>${escapeHTML(value)}</span>
<input type="checkbox" id="${id}"
data-facet="${facetKey}"
data-value="${escapeHTML(value)}"
${isChecked ? 'checked' : ''}>
<span class="facet-name">${escapeHTML(value)}</span>
<span class="facet-count">(${count})</span>
</label>
</div>
Expand Down
Loading