Add content classes #538
Replies: 2 comments
-
That is non standard syntax of Markdown. For compatibility with other Markdown processors, Marp team thinks using raw HTML elements, a part of CommonMark, is good habit rather than introducing the custom syntax. If you still want that, it should be better to introduce as a plugin. But currently, I also could not find out the markdown-it plugin or Marp plugin to add that syntax exactly same as remark.js. The most similar syntax is the combination with markdown-it-bracketed-spans and markdown-it-attrs. |
Beta Was this translation helpful? Give feedback.
-
I understand, I think the issues with raw HTML elements in
That being said, the first point could be easily tackled adding snippets/autocompletion in the Marp vscode extension. Actually, I just figured out how to use Emmet in markdown files, which would greatly simplifies it I hope. |
Beta Was this translation helpful? Give feedback.
-
Coming from remark.js, I used a lot content classes, which allowed to define and compose css style. I did not find any equivalent in marp (but I may be mistaking), apart from writing raw html/css directly in markdown (which is a bit cumbersome when it is just for locally changing words).
Typical use is changing the font for some text:
center.alert.left-5.bottom-30.font130[**Thank you!**]
would write the text "Thank you!" using all the css stylescenter
,font130
, etc.Beta Was this translation helpful? Give feedback.
All reactions