Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/resources/formats/html/ojs/quarto-ojs.css
12923 views
1
span.ojs-inline span div {
2
display: inline-block;
3
}
4
5
/* add some breathing room between display outputs and text especially */
6
div.cell + section,
7
div.cell + h1,
8
div.cell + h2,
9
div.cell + h3,
10
div.cell + h4,
11
div.cell + h5,
12
div.cell + h6,
13
div.cell + p {
14
margin-top: 1rem;
15
}
16
17
div[nodetype="declaration"]:not([data-output="all"])
18
div.observablehq:not(observablehq--error) {
19
display: none;
20
}
21
22
/* mimic bootstrap behavior which is always correct in observablehq outputs */
23
.observablehq a:not([href]):not([class]),
24
.observablehq a:not([href]):not([class]):hover {
25
color: inherit;
26
text-decoration: none;
27
}
28
29
.observablehq .observablehq--inspect {
30
--code-fallback: Consolas, monaco, monospace;
31
font-family: var(--bs-font-monospace, var(--code-fallback));
32
font-size: 0.8em;
33
}
34
35
.observablehq--field {
36
margin-left: 1rem;
37
}
38
39
.observablehq--caret {
40
margin-right: 2px;
41
vertical-align: baseline;
42
}
43
44
.observablehq--collapsed,
45
.observablehq--expanded.observablehq--inspect a {
46
cursor: pointer;
47
}
48
49
/* classes directly from observable's runtime */
50
.observablehq--key,
51
.observablehq--index {
52
color: var(--quarto-hl-dt-color);
53
}
54
55
.observablehq--string {
56
color: var(--quarto-hl-st-color);
57
}
58
59
.observablehq--bigint,
60
.observablehq--date,
61
.observablehq--number,
62
.observablehq--regexp,
63
.observablehq--symbol {
64
color: var(--quarto-hl-dv-color);
65
}
66
67
.observablehq--null,
68
.observablehq--boolean,
69
.observablehq--undefined,
70
.observablehq--keyword {
71
color: var(--quarto-hl-kw-color);
72
}
73
74
/* In addition, their import statements specifically come highlighted by hljs.
75
(probably some legacy feature of theirs?) We handle those here as well.
76
77
Just to be on the safe side, we select on observable's 'md-pre'
78
class as well, in case someone else uses hljs and wishes to put
79
their own highlighting.
80
81
TODO Note that to make our highlighting consistent, we're
82
overriding the "im" class to present like a keyword. I should make
83
sure this looks right everywhere, but I don't know how to test it
84
comprehensively.
85
*/
86
87
code.javascript span.im {
88
color: var(--quarto-hl-kw-color);
89
}
90
91
pre.observablehq--md-pre span.hljs-keyword {
92
color: var(--quarto-hl-kw-color);
93
}
94
95
pre.observablehq--md-pre span.hljs-string {
96
color: var(--quarto-hl-st-color);
97
}
98
99
pre.observablehq--md-pre .span.hljs-date,
100
pre.observablehq--md-pre .span.hljs-number,
101
pre.observablehq--md-pre .span.hljs-regexp,
102
pre.observablehq--md-pre .span.hljs-symbol {
103
color: var(--quarto-hl-dv-color);
104
}
105
106
/* Other general niceties, but it's possible that we should do this on a page-by-page basis */
107
108
input {
109
vertical-align: middle;
110
}
111
112
input[type="radio"],
113
input[type="checkbox"] {
114
margin: 0px 0px 3px 0px;
115
}
116
117
.observable-in-a-box-waiting-for-module-import {
118
visibility: hidden;
119
}
120
121
/* play nicely w/ sidebar layout */
122
.panel-sidebar .observablehq > form[class^="oi-"] {
123
flex-wrap: wrap !important;
124
}
125
126
/* likely that this only makes sense with bootstrap. TODO check with charles */
127
.observablehq table {
128
font-size: 0.9em !important;
129
}
130
131
.quarto-ojs-hide {
132
display: none;
133
}
134
135
.quarto-ojs-error-pinpoint {
136
border-bottom: 2px dotted #e51400;
137
font-weight: 700;
138
cursor: pointer;
139
}
140
141
code span.quarto-ojs-error-pinpoint {
142
color: inherit;
143
}
144
145
.observablehq--error .observablehq--inspect {
146
font-size: 0.875em !important;
147
}
148
149
.observablehq--error .callout {
150
margin-bottom: 0;
151
margin-top: 0;
152
}
153
154
/* this counteracts the negative margin which observablehq uses in their tables at runtime */
155
.quarto-ojs-table-fixup {
156
padding-left: 14px;
157
}
158
159
div.observablehq input[type="date"] {
160
border-style: solid;
161
padding: 0.8em 0.5em 0.8em 0.5em;
162
border-color: rgba(220, 220, 220, 0.3);
163
}
164
165