Просмотр исходного кода

adjust background-color to the marp theme

Yuki Takei 3 лет назад
Родитель
Сommit
5a3630f3f2

+ 13 - 0
packages/presentation/src/components/Presentation.global.scss

@@ -0,0 +1,13 @@
+:root[data-theme='light'] {
+  .reveal-viewport {
+    // adjust marp default theme
+    background-color: #fff;
+  }
+}
+
+:root[data-theme='dark'] {
+  .reveal-viewport {
+    // adjust marp default theme
+    background-color: #0d1117;
+  }
+}

+ 0 - 5
packages/presentation/src/components/Presentation.module.scss

@@ -1,10 +1,5 @@
 .grw-presentation {
 
-  // workaround from https://github.com/css-modules/css-modules/issues/295#issuecomment-952885628
-  &:global(.reveal-viewport) {
-    background-color: var(--bgcolor-global);
-  }
-
   // workaround from https://github.com/css-modules/css-modules/issues/295#issuecomment-952885628
   &:global(.reveal) :global {
     .slides {

+ 2 - 0
packages/presentation/src/components/Presentation.tsx

@@ -6,6 +6,8 @@ import Reveal from 'reveal.js';
 import { MARP_CONTAINER_CLASS_NAME, Sections } from './Sections';
 
 import 'reveal.js/dist/reveal.css';
+import './Presentation.global.scss';
+
 import styles from './Presentation.module.scss';