Deploy
This commit is contained in:
1 parent
8bbcf8ecd9
commit
45dd65b48e
116 files changed
+20457
-1164
No files matched your search
@@ -75,6 +75,103 @@ body.quarto-dark main img[src$=".svg"]:not(.no-invert) {
|
||||
filter: invert(1) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
/* --- captions -----------------------------------------------------------
|
||||
Quarto's caption grey reads 4.4:1 on cosmo's white, under WCAG AA. The
|
||||
muted token reads about 6.4:1 in light and in dark, and high contrast
|
||||
makes it the foreground. The list ends with Quarto's most specific caption
|
||||
selector so that :is() gives every entry its weight. */
|
||||
:is(.panel-caption, .figure-caption, .subfigure-caption, .table-caption,
|
||||
figcaption, caption, .margin-caption, .column-margin figcaption,
|
||||
.quarto-layout-cell[data-ref-parent] caption) {
|
||||
color: var(--calc-muted, #57606a);
|
||||
}
|
||||
|
||||
/* --- breadcrumbs --------------------------------------------------------
|
||||
Quarto greys the current page (#6c757d) and Bootstrap the separators; on
|
||||
darkly's breadcrumb band that reads 2.1:1. The ink token passes in every
|
||||
mode. `body` outweighs Quarto's own selectors; pseudo-elements cannot go
|
||||
inside :is(), hence the separate rule. */
|
||||
body :is(.quarto-title-breadcrumbs .breadcrumb li:last-of-type a,
|
||||
.breadcrumb-item.active) {
|
||||
color: var(--calc-ink, #1a1a1a);
|
||||
}
|
||||
body .breadcrumb-item + .breadcrumb-item::before,
|
||||
body .quarto-secondary-nav nav.quarto-page-breadcrumbs .breadcrumb-item::before,
|
||||
body .quarto-secondary-nav nav.quarto-page-breadcrumbs a {
|
||||
color: var(--calc-ink, #1a1a1a);
|
||||
}
|
||||
|
||||
/* --- Quarto's other greys -----------------------------------------------
|
||||
Quarto hard-codes #6c757d for every fold label (details > summary) and for
|
||||
the previous/next page links, and a mid grey for section numbers: 3.4:1 on
|
||||
darkly, 4.4:1 on cosmo. The muted token reads about 6.4:1 in both, and
|
||||
high contrast makes it the foreground. An exercise hint keeps its accent
|
||||
(.exo-hint > summary outweighs these), and the active entry of the
|
||||
contents still inherits its colour. */
|
||||
body details > summary,
|
||||
body .nav-page a,
|
||||
body .header-section-number {
|
||||
color: var(--calc-muted, #57606a);
|
||||
}
|
||||
|
||||
/* Quoted text: Quarto's .blockquote grey is 4.4:1 on cosmo, and it names the
|
||||
paragraphs, so they are named here too. */
|
||||
body :is(blockquote, .blockquote, blockquote p, .blockquote p) {
|
||||
color: var(--calc-muted, #57606a);
|
||||
}
|
||||
|
||||
/* Inline code: Bootstrap's pill is #f8f9fa in both themes, so darkly's light
|
||||
code text sat on near-white (1.05:1). The pill is now a faint tint of the
|
||||
page, which keeps each theme's code colour readable, and inherited muted
|
||||
text (code in a caption) too. */
|
||||
body :not(pre) > code:not(.sourceCode) {
|
||||
background-color: color-mix(in srgb, var(--calc-faint, #e7e9ec) 60%,
|
||||
var(--calc-surface, #ffffff));
|
||||
}
|
||||
|
||||
/* A code block inside a tinted box (exercise, hint, solution, "to go
|
||||
further", quiz): Quarto's block ground is 65% opaque, so the tint shows
|
||||
through and a11y-light's keyword red drops to 4.4:1. Here the ground is
|
||||
opaque, and the same light grey as on the page. */
|
||||
body :is(.exo, .exo-hint, .exo-sol, .further, .quiz) div.sourceCode {
|
||||
background-color: color-mix(in srgb, var(--calc-faint, #e7e9ec) 45%,
|
||||
var(--calc-surface, #ffffff));
|
||||
}
|
||||
/* A static (not executed) block also gives its <code> the translucent
|
||||
ground, so the two layers stack and darken it. The block carries the
|
||||
ground; the code inside is transparent, as in an executed cell. */
|
||||
body div.sourceCode > pre > code.sourceCode { background-color: transparent; }
|
||||
|
||||
/* --- Jupyter output: ANSI colours ---------------------------------------
|
||||
A traceback comes out in the notebook's terminal palette, made for a dark
|
||||
terminal: yellow is 1.9:1 and cyan 2.0:1 on the page. Each colour name
|
||||
takes the matching token with a fifth of ink, which keeps the hue and passes
|
||||
in all four modes. IPython's 256-colour spans carry inline styles and no
|
||||
name, so they take the text colour. */
|
||||
body :is(.ansi-black-fg, .ansi-bright-black-fg) { color: var(--calc-ink); }
|
||||
body :is(.ansi-white-fg, .ansi-bright-white-fg) { color: var(--calc-muted); }
|
||||
body :is(.ansi-red-fg, .ansi-bright-red-fg) {
|
||||
color: color-mix(in srgb, var(--calc-danger) 85%, var(--calc-ink));
|
||||
}
|
||||
body :is(.ansi-green-fg, .ansi-bright-green-fg) {
|
||||
color: color-mix(in srgb, var(--calc-accent-c) 75%, var(--calc-ink));
|
||||
}
|
||||
body :is(.ansi-yellow-fg, .ansi-bright-yellow-fg) {
|
||||
color: color-mix(in srgb, var(--calc-accent-b) 75%, var(--calc-ink));
|
||||
}
|
||||
body :is(.ansi-blue-fg, .ansi-bright-blue-fg) {
|
||||
color: color-mix(in srgb, var(--calc-accent-a) 80%, var(--calc-ink));
|
||||
}
|
||||
body :is(.ansi-magenta-fg, .ansi-bright-magenta-fg) {
|
||||
color: color-mix(in srgb, var(--calc-furthercolor) 85%, var(--calc-ink));
|
||||
}
|
||||
body :is(.ansi-cyan-fg, .ansi-bright-cyan-fg) {
|
||||
color: color-mix(in srgb,
|
||||
color-mix(in srgb, var(--calc-accent-a) 50%, var(--calc-accent-c)) 75%,
|
||||
var(--calc-ink));
|
||||
}
|
||||
body .ansi-escaped-output span[style*="color"] { color: inherit !important; }
|
||||
|
||||
/* --- higher contrast ---------------------------------------------------
|
||||
The high-contrast pair lives in high-contrast.css, which is loaded with
|
||||
this file and keys off `hc` on <html>. */
|
||||
@@ -107,6 +204,20 @@ body.quarto-dark :is(.aa-Autocomplete, .aa-DetachedFormContainer)
|
||||
color: var(--calc-muted, #9aa4b2);
|
||||
}
|
||||
|
||||
/* --- search: the selected result ----------------------------------------
|
||||
Quarto marks it with cosmo's primary (#2780e3) under white text, 3.97:1,
|
||||
and its matched words with a lighter blue, worse still. The same hue at a
|
||||
lower lightness passes. Night mode (darkly's #375a7f, 7.2:1) and high
|
||||
contrast (high-contrast.css) keep their own. */
|
||||
html:not(.hc) body:not(.quarto-dark) :is(.aa-DetachedOverlay, #quarto-search-results)
|
||||
li.aa-Item[aria-selected="true"] :is(.search-item, .search-item *:not(mark, .mark)) {
|
||||
background-color: oklch(from var(--bs-primary, #2780e3) 0.42 c h);
|
||||
}
|
||||
html:not(.hc) body:not(.quarto-dark) :is(.aa-DetachedOverlay, #quarto-search-results)
|
||||
li.aa-Item[aria-selected="true"] .search-item :is(mark.search-match, .search-match.mark) {
|
||||
background-color: oklch(from var(--bs-primary, #2780e3) 0.52 c h);
|
||||
}
|
||||
|
||||
/* --- the high-contrast switch -------------------------------------------
|
||||
Built by calc-notes.js next to Quarto's light/dark toggle, and styled to
|
||||
sit with it rather than stand out. */
|
||||
|
||||
Reference in new issue
Block a user