Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/package/src/common/patches/revealjs-theme-0001-dracula.patch
6453 views
1
diff --git a/src/resources/formats/revealjs/themes/dracula.scss b/src/resources/formats/revealjs/themes/dracula.scss
2
index 5330fbc1b..fe068d9a8 100644
3
--- a/src/resources/formats/revealjs/themes/dracula.scss
4
+++ b/src/resources/formats/revealjs/themes/dracula.scss
5
@@ -1,106 +1,90 @@
6
/**
7
* Dracula Dark theme for reveal.js.
8
* Based on https://draculatheme.com
9
+ *
10
+ * Adapted for Quarto by Posit, PBC
11
+ * Copyright (C) 2024 Posit, PBC
12
*/
13
14
-
15
-// Default mixins and settings -----------------
16
-@import "../template/mixins";
17
-@import "../template/settings";
18
-// ---------------------------------------------
19
-
20
-
21
+/*-- scss:defaults --*/
22
23
// Include theme-specific fonts
24
-$systemFontsSansSerif: -apple-system,
25
- BlinkMacSystemFont,
26
- avenir next,
27
- avenir,
28
- segoe ui,
29
- helvetica neue,
30
- helvetica,
31
- Cantarell,
32
- Ubuntu,
33
- roboto,
34
- noto,
35
- arial,
36
- sans-serif;
37
-$systemFontsMono: Menlo,
38
- Consolas,
39
- Monaco,
40
- Liberation Mono,
41
- Lucida Console,
42
- monospace;
43
-
44
-/**
45
- * Dracula colors by Zeno Rocha
46
- * https://draculatheme.com/contribute
47
- */
48
-html * {
49
- color-profile: sRGB;
50
- rendering-intent: auto;
51
-}
52
-
53
-$background: #282A36;
54
-$foreground: #F8F8F2;
55
-$selection: #44475A;
56
-$comment: #6272A4;
57
-$red: #FF5555;
58
-$orange: #FFB86C;
59
-$yellow: #F1FA8C;
60
-$green: #50FA7B;
61
-$purple: #BD93F9;
62
-$cyan: #8BE9FD;
63
-$pink: #FF79C6;
64
-
65
-
66
-
67
-// Override theme settings (see ../template/settings.scss)
68
-$body-color: $foreground;
69
-$presentation-heading-color: $purple;
70
-$presentation-heading-text-shadow: none;
71
-$presentation-heading-text-transform: none;
72
-$body-bg: $background;
73
-$link-color: $pink;
74
-$link-color-hover: $cyan;
75
-$selection-bg: $selection;
76
-$code-color: $green;
77
-$presentation-list-bullet-color: $cyan;
78
-
79
-$font-family-sans-serif: $systemFontsSansSerif;
80
-$font-family-monospace: "Fira Code", $systemFontsMono;
81
+$systemFontsSansSerif: -apple-system, BlinkMacSystemFont, avenir next, avenir,
82
+ segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial,
83
+ sans-serif;
84
+$systemFontsMono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console,
85
+ monospace;
86
+
87
+$background: #282a36;
88
+$foreground: #f8f8f2;
89
+$selection: #44475a;
90
+$comment: #6272a4;
91
+$red: #ff5555;
92
+$orange: #ffb86c;
93
+$yellow: #f1fa8c;
94
+$green: #50fa7b;
95
+$purple: #bd93f9;
96
+$cyan: #8be9fd;
97
+$pink: #ff79c6;
98
+
99
+// Override theme settings
100
+$body-color: $foreground !default;
101
+$presentation-heading-color: $purple !default;
102
+$presentation-heading-text-shadow: none !default;
103
+$presentation-heading-text-transform: none !default;
104
+$body-bg: $background !default;
105
+$link-color: $pink !default;
106
+$link-color-hover: $cyan !default;
107
+$selection-bg: $selection !default;
108
+$code-color: $green !default;
109
+$presentation-list-bullet-color: $cyan !default;
110
+
111
+$font-family-sans-serif: $systemFontsSansSerif !default;
112
+$font-family-monospace: "Fira Code", $systemFontsMono !default;
113
114
// Change text colors against light slide backgrounds
115
-@include light-bg-text-color($background);
116
+$light-bg-text-color: $body-bg !default;
117
118
-// Theme template ------------------------------
119
-@import "../template/theme";
120
-// ---------------------------------------------
121
+/*-- scss:rules --*/
122
123
// Define additional color effects based on Dracula spec
124
// https://spec.draculatheme.com/
125
:root {
126
- --r-bold-color: #{$orange};
127
- --r-italic-color: #{$yellow};
128
- --r-inline-code-color: #{$inlineCodeColor};
129
- --r-list-bullet-color: #{$listBulletColor};
130
+ --r-bold-color: #{$orange};
131
+ --r-italic-color: #{$yellow};
132
+ --r-inline-code-color: #{$code-color};
133
+ --r-list-bullet-color: #{$presentation-list-bullet-color};
134
}
135
136
.reveal {
137
- strong, b {
138
- color: var(--r-bold-color);
139
- }
140
- em, i, blockquote {
141
- color: var(--r-italic-color);
142
- }
143
- code {
144
- color: var(--r-inline-code-color);
145
- }
146
- // Dracula colored list bullets and numbers
147
- ul, ol {
148
- li::marker {
149
- color: var(--r-list-bullet-color);
150
- }
151
- }
152
+ strong,
153
+ b {
154
+ &:not(.callout-title strong, .callout-tile b) {
155
+ color: var(--r-bold-color);
156
+ }
157
+ }
158
+ em,
159
+ i,
160
+ blockquote {
161
+ color: var(--r-italic-color);
162
+ }
163
+ code {
164
+ color: var(--r-inline-code-color);
165
+ }
166
+ // Dracula colored list bullets and numbers
167
+ ul,
168
+ ol {
169
+ li::marker {
170
+ color: var(--r-list-bullet-color);
171
+ }
172
+ }
173
}
174
175
+/**
176
+ * Dracula colors by Zeno Rocha
177
+ * https://draculatheme.com/contribute
178
+ */
179
+html * {
180
+ color-profile: sRGB;
181
+ rendering-intent: auto;
182
+}
183
184