Files
stack/v1/packages/mosaic/framework/skills/slidev/references/style-scoped.md
T

631 B

name, description
name description
scoped Slide-scoped CSS styles

Slide Scope Styles

Define CSS that applies only to the current slide.

Usage

# This is Red

<style>
h1 {
  color: red;
}
</style>

---

# Other slides are not affected

Scoped by Default

All <style> tags in slides are automatically scoped.

Child combinators (.a > .b) don't work as expected due to scoping.

Nested CSS with UnoCSS

# Slidev

> Hello **world**

<style>
blockquote {
  strong {
    --uno: 'text-teal-500 dark:text-teal-400';
  }
}
</style>

Global Styles

For global styles, use styles/index.css in your project.