marp-css
Skill2 starsChanged 8 months agoMITView on GitHub
Use this skill whenever the user is working on Marp or Marpit slide design with CSS: creating a custom theme, restyling a Markdown deck, tuning style blocks, changing colors, typography, spacing, pagination, header/footer, backgrounds, or making a Marp deck look more polished. Trigger on mentions of Marp, Marpit, `@theme`, theme CSS, slide theming, deck styling, Gaia or Uncover customization, split backgrounds, or requests like 'make these Marp slides prettier' even if the user does not explicitly ask for CSS.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- azure-paas-supportSkill
- azure-resource-abbreviationsSkill
- backlog-apiSkill
- csharp-file-based-appsSkill
- dependabot-auto-mergeSkill
- devblog-updatesSkill
- github-changelogSkill
- github-entra-federated-credentialsSkill
- git-worktreeSkill
- hatena-blog-publisherSkill
- marp-deckSkill
- summarized-postSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 21 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill to design or revise the visual system of a Marp / Marpit deck without treating it like a generic web page.
- Distinctive: line 25
If Tailwind is mentioned, inspect how CSS is produced: compiled asset, CDN usage, or no Tailwind pipeline at all.
- Distinctive: line 32
Prefer a coherent palette, typographic scale, spacing rhythm, and image treatment over lots of one-off selectors.
- Distinctive: line 33
When changing theme code, also update the Markdown directives or theme references if needed.
- Very specific: line 38
Treat section or :root as the slide viewport.
- Very specific: line 40
Prefer rem for internal scale once the root font size is set.
- Very specific: line 41
If the deck uses Marp Core and needs switchable sizes, define @size presets in the theme.
- Very specific: line 44
Use @import or @import-theme when extending another theme instead of copying large chunks of CSS.
- Distinctive: line 65
Use Tailwind as a design-system source, not just a pile of utility classes.
- Distinctive: line 67
Use utility classes sparingly for local slide components that are easier to express in HTML than in Markdown.
- Distinctive: line 68
If class names are generated dynamically, make sure the build process safelists them or they may be removed during Tailwind's class …
- Distinctive: line 69
Do not assume responsive variants matter in exported slides the same way they do in apps.
- Distinctive: line 70
If Tailwind is unavailable, translate the intended utilities into ordinary theme CSS instead of blocking on the framework.
- Distinctive: line 82
Use a clear title scale, subheading scale, and body size.
- Distinctive: line 83
Keep body text readable; avoid shrinking text to fit weak layout choices.
- Distinctive: line 89
Avoid dense page-like prose styling.
- Distinctive: line 90
Use generous padding and consistent gaps so each slide reads at a glance.
- Distinctive: line 94
Use Markdown structure for headings, lists, quotes, tables, and background images.
- Distinctive: line 95
Use CSS for tone, rhythm, alignment, and component styling.
- Distinctive: line 96
Do not force every layout with absolute positioning if Markdown structure can do it more robustly.
- Distinctive: line 100
When the user wants code, produce:
- Distinctive: line 104
If Tailwind is involved, state whether the solution assumes an existing Tailwind build, CDN usage, or a translation into plain CSS.
- Distinctive: line 109
Keep selectors simple and explainable.
- Distinctive: line 110
Default to theme tokens and reusable patterns instead of brittle per-slide overrides.
- Distinctive: line 113
If the user asks for a redesign, give them a coherent system, not isolated cosmetics.
- Very specific: line 126
Read references/marp-css-reference.md when you need exact Marp / Marpit behavior or a reminder of official constraints.
- Very specific: line 127
Start from assets/starter-theme.css when the user wants a reusable custom theme or needs a clean base to iterate on.
- Very specific: line 128
Read assets/tailwind-token-bridge.css when the user wants a Marp theme that borrows Tailwind-style tokens without depending on utility …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Marp CSS Design
Use this skill to design or revise the visual system of a Marp / Marpit deck without treating it like a generic web page.
Quick routing
| Situation | What to do |
| Small one-off slide tweak | Edit the deck's <style> block. Use <style scoped> when the change should affect only one slide. |
| Repeated deck-wide styling | Create or update a reusable theme CSS file with /* @theme ... */. |
| Built-in theme is close but not enough | Start from @import 'default', @import 'gaia', or @import 'uncover', then layer custom tokens and component styles. |
| User wants to use Tailwind CSS | First determine whether Tailwind is part of the build pipeline. If yes, use utility classes in raw HTML only where that keeps slides clearer; keep deck-wide structure, typography, pagination, and reuse in theme CSS. |
| User wants "nicer visuals" but not a full redesign | Keep content structure, improve palette, typography, spacing, emphasis, and image treatment first. |
| User wants image-led layouts | Use Marpit background image syntax such as ![bg], ![bg right], or ![bg left:33%] in Markdown, not CSS hacks alone. |
Workflow
- Inspect the current Markdown deck and any existing theme CSS before writing new rules.
- If Tailwind is mentioned, inspect how CSS is produced: compiled asset, CDN usage, or no Tailwind pipeline at all.
- Decide whether the job is better served by theme CSS, Tailwind utilities in HTML snippets, or a hybrid approach.
- Decide the smallest correct scope:
- inline
<style>for local tuning <style scoped>for a single slide- theme CSS file for reusable branding
- inline
- Preserve the author's intent. Improve the design system before rewriting slide content.
- Prefer a coherent palette, typographic scale, spacing rhythm, and image treatment over lots of one-off selectors.
- When changing theme code, also update the Markdown directives or theme references if needed.
Marp-specific rules
- Theme CSS must declare
/* @theme name */. - Treat
sectionor:rootas the slide viewport. In Marpit theme CSS,:rootmaps to each slide, not the page<html>. - Set slide
widthandheightonly with absolute units such aspx,pt,in, orcm. - Prefer
remfor internal scale once the root font size is set. - If the deck uses Marp Core and needs switchable sizes, define
@sizepresets in the theme. - Style pagination through
section::afteror:root::after. If you customizecontent, it must still includeattr(data-marpit-pagination). headerandfooterfrom Marp directives have no default theme styling. Position them explicitly if used.- Use
@importor@import-themewhen extending another theme instead of copying large chunks of CSS. - For slide-specific visual exceptions, prefer
<style scoped>over bloating the shared theme. - Raw HTML
classattributes are allowed in Marp, so Tailwind utility classes can work on HTML fragments, but only if the rendered deck actually includes the compiled Tailwind CSS.
Tailwind considerations
When Tailwind is a good fit
- The deck already lives inside a web build pipeline that compiles Tailwind.
- The user is styling raw HTML fragments inside slides and wants quick, local layout control.
- The main need is utility-driven composition for cards, badges, compact flex layouts, or responsive-ish HTML fragments in browser-rendered output.
When plain theme CSS is the better default
- The user wants reusable deck-wide styling across many slides.
- The task involves slide size, root typography, pagination, header/footer, or Marp-specific constructs.
- The deck is exported through a workflow where Tailwind assets are not obviously present.
- The user is writing mostly Markdown, not HTML-heavy slide bodies.
Hybrid guidance
- Use Tailwind as a design-system source, not just a pile of utility classes.
- Extract palette, spacing, radius, and type choices from Tailwind into CSS custom properties in the Marp theme when those choices should apply deck-wide.
- Use utility classes sparingly for local slide components that are easier to express in HTML than in Markdown.
- If class names are generated dynamically, make sure the build process safelists them or they may be removed during Tailwind's class scanning.
- Do not assume responsive variants matter in exported slides the same way they do in apps; slide canvases are usually fixed-size.
- If Tailwind is unavailable, translate the intended utilities into ordinary theme CSS instead of blocking on the framework.
Design heuristics
1. Build a deck-level visual system first
- Pick one dominant background mode: mostly light, mostly dark, or clearly alternating by section.
- Limit the palette to one dominant tone, one support tone, and one accent.
- Define reusable tokens with CSS custom properties for background, foreground, accent, muted text, border, and code background.
2. Make hierarchy obvious
- Use a clear title scale, subheading scale, and body size.
- Keep body text readable; avoid shrinking text to fit weak layout choices.
- Make emphasis intentional with weight, color, or spacing, not all three everywhere.
3. Design for slides, not documents
- Favor short blocks, card layouts, callouts, comparisons, and image-text pairings.
- Avoid dense page-like prose styling.
- Use generous padding and consistent gaps so each slide reads at a glance.
4. Let Markdown and CSS share the job
- Use Markdown structure for headings, lists, quotes, tables, and background images.
- Use CSS for tone, rhythm, alignment, and component styling.
- Do not force every layout with absolute positioning if Markdown structure can do it more robustly.
Output requirements
When the user wants code, produce:
- The updated theme CSS or
<style>block. - Any required Markdown directives or usage snippet, such as
theme:,size:,paginate:,header:, background image syntax, or raw HTML with Tailwind classes. - If Tailwind is involved, state whether the solution assumes an existing Tailwind build, CDN usage, or a translation into plain CSS.
- A brief rationale tied to the visual goal, unless the user asked for code only.
Quality bar
- Keep selectors simple and explainable.
- Default to theme tokens and reusable patterns instead of brittle per-slide overrides.
- Preserve compatibility with Marp features like pagination, scoped styles, and split backgrounds.
- Preserve Tailwind compatibility by avoiding advice that assumes utility classes work without a compiled stylesheet.
- If the user asks for a redesign, give them a coherent system, not isolated cosmetics.
Avoid
- Generic web-app assumptions about DOM structure outside slide
sectioncontent. - Viewport-relative slide sizes such as
vworvh. - Pagination styles that remove
attr(data-marpit-pagination). - Overusing absolute positioning for ordinary text flow.
- Rewriting the whole deck when a token or layout adjustment would solve the problem.
- Assuming Tailwind utility classes will work in Markdown-only content without HTML wrappers and loaded CSS.
Bundled resources
- Read
references/marp-css-reference.mdwhen you need exact Marp / Marpit behavior or a reminder of official constraints. - Start from
assets/starter-theme.csswhen the user wants a reusable custom theme or needs a clean base to iterate on. - Read
assets/tailwind-token-bridge.csswhen the user wants a Marp theme that borrows Tailwind-style tokens without depending on utility classes everywhere.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

