-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy paththeme.scss
More file actions
89 lines (77 loc) · 2.65 KB
/
Copy paththeme.scss
File metadata and controls
89 lines (77 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*-- scss:defaults --*/
$link-color: #39729E;
$text-muted: #6a737b;
// Align light mode with the site's brand blue (theme-dark.scss $blue).
// This also clears the white-on-primary contrast failures on cosmo's
// #2780e3 (3.97:1): .btn-primary, .text-bg-primary badges, and Quarto's
// notebook-preview header, whose h6 Quarto dims to opacity .9 (axe
// color-contrast-b09c0e, -50505e). White on #447099 is 5.22:1; the faded
// h6 is 4.59:1.
$primary: #447099;
// Quarto's body-secondary mixin (blockquotes, captions, asides, header
// section numbers) defaults to theme-dim($body-color, 25%) = #6d7a86, only
// 4.39:1 on white — a WCAG AA 1.4.3 failure (axe color-contrast-7ed054).
// Defining $body-secondary makes the mixin use it instead; $text-muted is
// 4.83:1.
$body-secondary: $text-muted;
// Code-block background: the darkest tint of the site's cosmo blue-gray that
// still keeps every a11y-light syntax color at WCAG AA (>=4.5:1). a11y-light's
// palette is tuned for a near-white background, so this stays pale; one step
// darker (#eef1f4) drops the worst token (red #d91e18) below 4.5:1.
$code-block-bg: #eff2f5;
/*-- scss:rules --*/
// Quarto dims appendix content (footnotes, citation, reuse) to opacity .9,
// which fades $link-color to an effective #4d80a8 = 4.22:1 on white — a WCAG
// AA 1.4.3 failure (axe color-contrast-733538). Undo the fade; selectors
// mirror Quarto's so this wins by cascade order in the light theme, while
// the dark stylesheet (loaded after this one) re-asserts Quarto's .9 —
// the dark link color passes even faded. Remove if quarto-cli fixes
// this upstream.
#quarto-appendix.default section {
*[role="doc-endnotes"],
> *:not(a) {
opacity: 1;
}
}
.layout-example {
background: $gray-600;
color: $white;
text-align: center;
margin-bottom: 1em;
font-family: $font-family-monospace;
font-size: .875em;
font-weight: 600;
padding-top: 1em;
border-radius: 3px;
}
.left {
text-align: left;
padding-left: 1em;
}
.right {
text-align: right;
padding-right: 1em;
}
#quarto-announcement {
padding: 1em;
font-size: 1em;
font-weight: bold;
color: $white;
background-color: #447099;
}
#quarto-announcement a {
color: $white;
}
// Toolbar icons in prose: shown as a key cap, without <kbd> (see _style-guide.md).
// Extends Quarto's .kbd so light and dark themes each pick up their own colors.
img.ui-icon {
@extend .kbd;
padding: 0.15rem 0.3rem;
vertical-align: middle;
box-sizing: content-box;
}
// Quarto's title-block.scss sets `.quarto-category { opacity: 0.6 }`.
// That drops the category chips below 4.5:1 (2.77 light, 3.43 dark).
.quarto-title .quarto-categories .quarto-category {
opacity: 1;
}