If you need to add styles to posts, you can wrap the post content in a div that has a data attribute. The data attribute will not be stripped from div tags. For example, if you create a post with the following HTML:
<div data-custom>
This is in a custom div
</div>
<div data-custom=true>
This is a custom div with the attribute set to true
</div>
you can target the divs with the following CSS:
[data-custom] {
color: blue;
}
[data-custom=true] {
background: red;
}