# Modifying slides styling with cssclasses does not work

**URL:** <https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451>\
**Category:** Devs: Theme Design & Custom CSS\
**Tags:** custom-css, slides\
**Created:** [June 2, 2025, 7:33pm UTC](https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451 "2025-06-02T19:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aLazar](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@aLazar](https://forum.obsidian.md/u/aLazar)\
**Post date:** [June 2, 2025, 7:33pm UTC](https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451/1 "2025-06-02T19:33:39Z")

</div>

### What I’m trying to do

I wanted to change the styling of some elements in the presentation slides. I created the following snippet which worked:

```auto
.reveal h1 {
    font-size: 1.25em;
    text-transform: none;
}

.reveal h2 {
    font-size: 0.8em;
    text-transform: none
}

.reveal h3 {
    font-size: 0.65;
    text-transform: none
}

.reveal .slides p {
    text-align: left;
    font-size: x-large;
}

.reveal ul {
    display: block;
    font-size: x-large;
}

.reveal ol {
    display: block;
    font-size: x-large;
}

```

However this snippet applies itself to all notes, but I want to be able to apply it to specific notes.

### Things I have tried

I’ve tried creating a cssclass like so:

```auto
.basic.reveal h1 {
    font-size: 1.25em;
    text-transform: none;
}

```

Adding basic to cssclasses does nothing. I tried looking on the internet and couldn’t find a solution. I’m probably missing something, perhaps because I’m trying to change the slides rather than the note itself.

---

<div class="post-metadata">

**Author:** ![ariehen](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ariehen/32/46932_2.png) [@ariehen](https://forum.obsidian.md/u/ariehen)\
**Post date:** [June 2, 2025, 10:52pm UTC](https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451/2 "2025-06-02T22:52:53Z")

</div>

`cssclasses` are applied to the `.markdown-source-view` (Source mode and Live Preview) and `.markdown-preview-view` (Reading view) elements. See [https://forum.obsidian.md/t/using-cssclasses-in-snippets/100577](https://forum.obsidian.md/t/using-cssclasses-in-snippets/100577) for a few more details.

I don’t see those in slides, unfortunately, so I don’t think you can apply any cssclass to them (without a plugin).

 ![Screenshot 2025-06-03 074135](https://forum.obsidian.md/uploads/default/original/3X/e/c/ec50c701610e9fa2ca150d2392ac0de8f9552790.png)

* * *

You could have a look at [https://www.ebullient.dev/projects/obsidian-slides-extended/themes](https://www.ebullient.dev/projects/obsidian-slides-extended/themes). It appears you can write your own theme file and apply it from the YAML/Properties.

 ![Screenshot 2025-06-03 074217](https://forum.obsidian.md/uploads/default/original/3X/a/6/a6321af268d85978b451a7389f948fceaaa33d13.png)

---

<div class="post-metadata">

**Author:** ![aLazar](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@aLazar](https://forum.obsidian.md/u/aLazar)\
**Post date:** [June 5, 2025, 7:04pm UTC](https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451/3 "2025-06-05T19:04:15Z")

</div>

I’ve tried the extension and although it did not work well with my css snippet, I managed to find a workaround using the FrontMatter configurations.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [June 12, 2025, 7:05pm UTC](https://forum.obsidian.md/t/modifying-slides-styling-with-cssclasses-does-not-work/101451/4 "2025-06-12T19:05:06Z")

</div>

Closed on June 12, 2025, 7:05pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
