1
0

dracula.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /**
  2. * Dracula Dark theme for reveal.js.
  3. * Based on https://draculatheme.com
  4. */
  5. // Load utils
  6. @use 'sass:color';
  7. @use 'template/mixins' as mixins;
  8. // Include theme-specific fonts
  9. $systemFontsSansSerif: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui,
  10. helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
  11. $systemFontsMono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
  12. $background: #282a36;
  13. $foreground: #f8f8f2;
  14. $selection: #44475a;
  15. $comment: #6272a4;
  16. $red: #ff5555;
  17. $orange: #ffb86c;
  18. $yellow: #f1fa8c;
  19. $green: #50fa7b;
  20. $purple: #bd93f9;
  21. $cyan: #8be9fd;
  22. $pink: #ff79c6;
  23. $mainFont: $systemFontsSansSerif;
  24. $codeFont: 'Fira Code', $systemFontsMono;
  25. // Inject theme variables (with some overrides)
  26. @use 'template/settings' with (
  27. $background-color: #191919,
  28. $main-font: $mainFont,
  29. $main-font-size: 42px,
  30. $main-color: $foreground,
  31. $code-font: $codeFont,
  32. $heading-color: $purple,
  33. $heading-font: $mainFont,
  34. $heading-font-weight: 600,
  35. $heading-text-transform: none,
  36. $heading1-size: 2.5em,
  37. $heading2-size: 1.6em,
  38. $heading3-size: 1.3em,
  39. $heading4-size: 1em,
  40. $link-color: $pink,
  41. $link-color-hover: $cyan,
  42. $selection-color: #fff,
  43. $selection-background-color: $selection
  44. );
  45. // Inject the theme template
  46. @use 'template/theme';
  47. // Change text colors against light slide backgrounds
  48. @include mixins.light-bg-text-color($background);
  49. // Define additional color effects based on Dracula spec
  50. // https://spec.draculatheme.com/
  51. :root {
  52. --r-bold-color: #{$orange};
  53. --r-italic-color: #{$yellow};
  54. --r-inline-code-color: #{$green};
  55. --r-list-bullet-color: #{$cyan};
  56. }
  57. /**
  58. * Dracula colors by Zeno Rocha
  59. * https://draculatheme.com/contribute
  60. */
  61. .reveal {
  62. strong,
  63. b {
  64. color: var(--r-bold-color);
  65. }
  66. em,
  67. i,
  68. blockquote {
  69. color: var(--r-italic-color);
  70. }
  71. code {
  72. color: var(--r-inline-code-color);
  73. }
  74. // Dracula colored list bullets and numbers
  75. ul,
  76. ol {
  77. li::marker {
  78. color: var(--r-list-bullet-color);
  79. }
  80. }
  81. }