MediaWiki:Common.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1,832:
MW 1.43's sanitizer REJECTS <details>/<summary> in wikitext
(verified live: tags render as literal text), so this is spans +
athe tiny MediaWiki:Common.js toggle (adds/removes .ed-fn-open on chip click).
chip click). Readers see a small dotted-underline "note" chip; clicking opens
the chipnote textas isa CSSPOPOVER content,card NOTthat infloats ABOVE the DOM text. Clicking(no reflow —
the paragraph never shifts). The chip label is CSS content and the
expands the note inline in the secondary voice, wrapped in
CSS-generated parens. The literal "(footnote: " / ")" wrappers live in always-hidden spans,
stay inso the DOMbot's insideHTML always-hiddenretrieval spans, soreads the bot'sfull HTMLnote regardless of CSS
retrieval(Docling readsparses exactlythe DOM, not the pre-templaterendered formatlayout) — readers and RAG
RAG see different things from the sameone markup. ── */
Common.js adds .ed-fn-flip near the right edge (card opens leftward)
.ed-fn-chip { cursor: pointer; }
and keeps only one card open at a time. ── */
.ed-fn-body { displayposition: nonerelative; } /* collapsedthe bypopover's defaultanchor */
.ed-fn-chip { cursor: pointer; white-space: nowrap; }
.ed-fn-chip::after {
content: "note";
Line 1,850 ⟶ 1,853:
text-underline-offset: 2px;
}
.ed-fn-chip:hover::after,
.ed-fn.ed-fn-open > .ed-fn-chip::after { color: var(--ed-link); }
 
.ed-fn-pre, .ed-fn-close { display: none; } /* DOM text for the bot only */
/* always in the DOM for the bot; never shown to readers as inline text */
.ed-fn-body { display: none; } /* collapsed by default */
.ed-fn-pre, .ed-fn-close { display: none; } /* DOM text for the bot only */
.ed-fn-body { display: none; }
 
/* the popover card */
.ed-fn.ed-fn-open > .ed-fn-body {
display: inlineblock;
position: absolute;
color: var(--ed-secondary);
top: 1.6em; /* just below the chip's line */
left: 0;
z-index: 30;
width: max-content;
max-width: min(24rem, 90vw); /* never overflow the viewport */
padding: 0.7em 0.9em;
background: #fff;
border: 1px solid var(--ed-hairline-strong);
border-left: 3px solid var(--ed-accent); /* house coral spine */
border-radius: 2px;
box-shadow: 0 6px 22px rgba(43, 41, 38, 0.14);
font-family: var(--ed-serif);
font-size: 0.9rem;
font-weight: 400;
font-style: normal;
line-height: 1.5;
letter-spacing: 0;
text-align: left;
text-transform: none;
white-space: normal;
color: var(--ed-secondaryink);
}
/* a card needs no inline parens */
.ed-fn.ed-fn-open > .ed-fn-body::before { content: " ("; }
.ed-fn.ed-fn-open > .ed-fn-body::after { content: ")"; }before,
.ed-fn.ed-fn-open > .ed-fn-body::beforeafter { content: " ("none; }
/* near the right edge, open the card leftward (JS sets .ed-fn-flip) */
.ed-fn.ed-fn-open.ed-fn-flip > .ed-fn-body { left: auto; right: 0; }
 
/* no-JS safety net: if site JS ever fails to load, notes stay readable */
.client-nojs .ed-fn-body { display: inline; color: var(--ed-secondary); }
Line 1,869 ⟶ 1,902:
h1#firstHeading, .mw-first-heading { font-size: 1.7rem; }
.mw-body-content h2, .mw-body-content .mw-heading2 { font-size: 1.22rem; }
/* footnote card → fixed bottom sheet so it can never clip off-screen */
.ed-fn.ed-fn-open > .ed-fn-body {
position: fixed;
left: 1rem; right: 1rem; bottom: 1rem;
top: auto; width: auto; max-width: none;
box-shadow: 0 -4px 22px rgba(43, 41, 38, 0.18);
}
.ext-aiassistant-prompt-composer { border-bottom: 1px solid var(--ed-hairline) !important; }
}