Template:UI/faqs library/styles.css
From Miniscope
/* TemplateStyles for {{UI/faqs_library}} — curated FAQs library
page. Sections: header (heading + lead + stats) and filtered FAQ
list (SRF format=filtered + entry row partial). The SRF filter
sidebar styles itself via its own resource module; we only style
the wrapper plus the per-entry accordion row. */
.faqs-library {
margin: 0 0 2em 0;
}
.faqs-library-lead {
font-size: 1.05rem;
color: var(--labki-text-muted, #5a6a7a);
margin: 0 0 1em 0;
max-width: 60em;
}
.faqs-library-stats {
margin-bottom: 1.25em;
}
/* ---------- Filtered FAQ feed ---------- */
.faqs-library-feed {
margin-top: 1.5em;
}
/* Outer row container. mw-collapsed gets the mw-collapsible JS
to inject its toggle link — we position it to the right of the
summary row via the .mw-collapsible-toggle override below. */
.faqs-library-entry {
padding: 0.7em 0;
border-bottom: 1px solid var(--labki-border, #d8dde2);
position: relative;
}
.faqs-library-entry:last-child {
border-bottom: none;
}
/* Always-visible header row: question + facet chips on the left,
mw-collapsible toggle pushed right by margin-left:auto on the
toggle itself (see below). flex-wrap so chips wrap below the
question on narrow screens. */
.faqs-library-entry-summary {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.6em;
padding-right: 7em; /* leave room for the absolute-positioned toggle */
}
.faqs-library-entry-question {
font-size: 1rem;
font-weight: 600;
line-height: 1.4;
color: var(--labki-text, #2c2c2c);
flex: 1 1 60%;
}
.faqs-library-entry-question a,
.faqs-library-entry-question a:visited {
color: inherit;
text-decoration: none;
}
.faqs-library-entry-question a:hover {
text-decoration: underline;
}
/* ---------- Facet chips on the summary row ---------- */
.faqs-library-entry-facets {
display: inline-flex;
flex-wrap: wrap;
gap: 0.3em;
font-size: 0.75rem;
align-items: center;
}
.faqs-library-entry-facet {
display: inline-block;
padding: 1px 7px;
border-radius: 999px;
background: var(--labki-bg-subtle, #f4f6f8);
border: 1px solid var(--labki-border, #d8dde2);
color: var(--labki-text, #2c2c2c);
white-space: nowrap;
}
.faqs-library-entry-facet a,
.faqs-library-entry-facet a:visited {
color: inherit;
text-decoration: none;
}
/* Topic chip — accent-bordered to read as the primary tag, same
visual weight as the paper-type chip in publications_library.
Restating the full `border:` shorthand (instead of overriding just
`border-color:`) sidesteps MW's TemplateStyles sanitizer rejecting
var() inside border-color — same level-4-shorthand restriction
worked around in Template:Category/Publication/styles.css (#85). */
.faqs-library-entry-facet-topic {
border: 1px solid var(--labki-accent, #2774AE);
color: var(--labki-accent, #2774AE);
}
/* Workflow-stage chip — neutral; signals "where in the process". */
.faqs-library-entry-facet-stage {
background: var(--labki-bg-subtle, #f4f6f8);
}
/* Audience-level chip — italic muted, conveys skill prereq. */
.faqs-library-entry-facet-level {
font-style: italic;
color: var(--labki-text-muted, #5a6a7a);
}
/* ---------- mw-collapsible toggle override ---------- */
/* The toggle text is set per-row via data-expandtext / data-collapsetext
on the outer .mw-collapsible div ("▸ Show answer" / "▾ Hide answer").
Pin it to the top-right of the row so the summary line keeps clean
left-aligned question text and the toggle never wraps under the
chips on narrow screens. */
.faqs-library-entry .mw-collapsible-toggle {
position: absolute;
top: 0.7em;
right: 0;
font-size: 0.8rem;
font-weight: 500;
color: var(--labki-accent, #2774AE);
white-space: nowrap;
}
.faqs-library-entry .mw-collapsible-toggle a,
.faqs-library-entry .mw-collapsible-toggle a:visited {
color: inherit;
text-decoration: none;
}
.faqs-library-entry .mw-collapsible-toggle a:hover {
text-decoration: underline;
}
/* ---------- Expanded answer area ---------- */
.faqs-library-entry-answer {
margin: 0.6em 0 0 0;
padding: 0.6em 0.9em;
background: var(--labki-bg-subtle, #f4f6f8);
border-left: 3px solid var(--labki-accent, #2774AE);
border-radius: 0 4px 4px 0;
font-size: 0.95rem;
line-height: 1.55;
color: var(--labki-text, #2c2c2c);
}
.faqs-library-entry-meta {
margin-top: 0.5em;
font-size: 0.85rem;
color: var(--labki-text-muted, #5a6a7a);
}
.faqs-library-entry-meta-label {
font-weight: 600;
}
.faqs-library-empty {
padding: 1em;
color: var(--labki-text-muted, #5a6a7a);
font-style: italic;
text-align: center;
background: var(--labki-bg-subtle, #f4f6f8);
border-radius: 4px;
}