-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Simply remove a line HintThe root element for contents in common HTML is If you want to make CSS compatible with both of HTML page and Marp slides, it's important to apply styles to both root elements. |
Beta Was this translation helpful? Give feedback.
Simply remove a line
@import 'default';
. This is Marp-specific definition for to inherit styles from Marp default theme. You have inherited a lot of unique styles by this line.Hint
The root element for contents in common HTML is
<html>
, but the root element in Marp slides is<section>
for each pages. All of CSS declarations in Marp will apply only in rendered Marp slides. So the styles for outer elements like<html>
and<body>
will be ignored in Marp rendering.If you want to make CSS compatible with both of HTML page and Marp slides, it's important to apply styles to both root elements.
:root
pseudo-class will match to the correct root element in both cases (match to<html>
in common HT…