@@ -209,6 +209,18 @@ export const GlobalStyles = createGlobalStyle`
209209 --background-gradient: url('/images/backgrounds/gradient_dark.svg');
210210 --background-func-gradient: url('/images/backgrounds/func_gradient_dark.png');
211211 --hero-box-shadow: 0 0 20px 52px inset rgb(30 32 40 / 55%);
212+
213+ --prism-bg: var(--ink-black);
214+ --prism-comment: #999;
215+ --prism-punctuation: #ccc;
216+ --prism-tag: #e2777a;
217+ --prism-function-name: #6196cc;
218+ --prism-boolean: #f08d49;
219+ --prism-property: #f8c555;
220+ --prism-selector: #cc99cd;
221+ --prism-string: #7ec699;
222+ --prism-operator: #67cdcc;
223+ --prism-inserted: green;
212224 }
213225
214226 [data-theme="light"] {
@@ -252,6 +264,18 @@ export const GlobalStyles = createGlobalStyle`
252264 --background-gradient: url('/images/backgrounds/gradient_light.svg');
253265 --background-func-gradient: url('/images/backgrounds/func-gradient-dark.png');
254266 --hero-box-shadow: transparent;
267+
268+ --prism-bg: var(--ink-black);
269+ --prism-comment: #7d8b99;
270+ --prism-punctuation: #5f6364;
271+ --prism-tag: #c92c2c;
272+ --prism-function-name: #c92c2c;
273+ --prism-boolean: #c92c2c;
274+ --prism-property: #c92c2c;
275+ --prism-selector: #2f9c0a;
276+ --prism-string: #2f9c0a;
277+ --prism-operator: #a67f59;
278+ --prism-inserted: #2f9c0a;
255279 }
256280
257281 [data-theme='dark'] [data-hide-on-theme='dark'],
@@ -332,10 +356,80 @@ export const GlobalStyles = createGlobalStyle`
332356 white-space: nowrap; /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
333357 }
334358
335- /* Override Auth0's style choices */
336- .auth0-lock {
337- /* It's always light - this fixes the browser UI */
338- color-scheme: light;
339- font-family: ${ theme . fontFamily . dmSans } ;
359+ /* PrismJS syntax highlighting, based on prism-tomorrow but linked to vars */
360+ pre[class*="language-"] {
361+ background: var(--prism-bg);
362+ color: var(--prism-text);
363+ }
364+
365+ .token.comment,
366+ .token.block-comment,
367+ .token.prolog,
368+ .token.doctype,
369+ .token.cdata {
370+ color: var(--prism-comment);
371+ }
372+
373+ .token.punctuation {
374+ color: var(--prism-punctuation);
375+ }
376+
377+ .token.tag,
378+ .token.attr-name,
379+ .token.namespace,
380+ .token.deleted {
381+ color: var(--prism-tag);
382+ }
383+
384+ .token.function-name {
385+ color: var(--prism-function-name);
386+ }
387+
388+ .token.boolean,
389+ .token.number,
390+ .token.function {
391+ color: var(--prism-boolean);
392+ }
393+
394+ .token.property,
395+ .token.class-name,
396+ .token.constant,
397+ .token.symbol {
398+ color: var(--prism-property);
399+ }
400+
401+ .token.selector,
402+ .token.important,
403+ .token.atrule,
404+ .token.keyword,
405+ .token.builtin {
406+ color: var(--prism-selector);
407+ }
408+
409+ .token.string,
410+ .token.char,
411+ .token.attr-value,
412+ .token.regex,
413+ .token.variable {
414+ color: var(--prism-string);
415+ }
416+
417+ .token.operator,
418+ .token.entity,
419+ .token.url {
420+ color: var(--prism-operator);
421+ }
422+
423+ .token.inserted {
424+ color: var(--prism-inserted);
425+ }
426+
427+ .token.important,
428+ .token.bold {
429+ font-weight: bold;
430+ }
431+
432+ .token.italic {
433+ font-style: italic;
340434 }
341435` ;
0 commit comments