Adding classes to paragraphs for styling


I am trying to create some custom paragraph styles with CSS.

p.custom-class {
  font-size: 30px;
  line-height: 40px;
  direction: rtl;

But when I call that class in Discourse editor it is not working:
<p class="custom-class">TEXT</p>

I will create multiple paragraph style. I need a solution for this. Any solution?


Edit: It seems div[data-theme-*] is working but not working for p element.

Maybe see Generic bbcode wrapper for theme components