Skip to content

Using Tailwind CSS 3 in Marp #237

Answered by yhatt
sbibauw asked this question in Q&A
Dec 13, 2021 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

For Tailwind CSS v3.0, the CSS-based CDN build we’ve offered in the past has been replaced by the new Play CDN, which gives you the full power of the new engine right in the browser with no build step.

https://tailwindcss.com/docs/upgrade-guide#play-cdn

If you want to use Tailwind v3, just replacing CSS @import to <script> tag should work.

 ---
 marp: true
-style: @import url('https://unpkg.com/tailwindcss@^2/dist/utilities.min.css');
 ---

+<script src="https://cdn.tailwindcss.com/3.0.0"></script>

⚠️ Please keep in mind Marp team does not so recommend to enable HTML in Markdown for saving users from any malicious things. Especially putting <script> tag(s) can run powerful scripts in …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@sbibauw
Comment options

@yhatt
Comment options

@mil-ad
Comment options

Answer selected by sbibauw
Comment options

You must be logged in to vote
2 replies
@sbibauw
Comment options

@mil-ad
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants