You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/syntax.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,42 @@ console.log('HelloWorld')
114
114
115
115
Learn more about [configuring Monaco](/custom/config-monaco).
116
116
117
+
## Embedded Styles
118
+
119
+
You can use `<style>` tag in your Markdown directly to override styles for the **current slide**.
120
+
121
+
```md
122
+
# This is Red
123
+
124
+
<style>
125
+
h1 {
126
+
color: red
127
+
}
128
+
</style>
129
+
130
+
---
131
+
132
+
# Next slide is not affected
133
+
```
134
+
135
+
`<style>` tag in Markdown is always [scoped](https://vue-loader.vuejs.org/guide/scoped-css.html). To have global style overrides, check out the [customization section](/custom/directory-structure#style).
136
+
137
+
Powered by [Windi CSS](https://windicss.org), you can directly use nested css and [directives](https://windicss.org/features/directives.html) (e.g. `@apply`)
138
+
139
+
```md
140
+
# Slidev
141
+
142
+
> Hello `world`
143
+
144
+
<style>
145
+
blockquote {
146
+
code {
147
+
@apply text-teal-500 dark:text-teal-400;
148
+
}
149
+
}
150
+
</style>
151
+
```
152
+
117
153
## Notes
118
154
119
155
You can also take notes for each slide. They will show up in [Presenter Mode](/guide/presenter-mode) for you to reference during presentations.
0 commit comments