Add a feature that allows you to predefine paragraph style spacing based on which style comes before or after it
I have set up some paragraph styles in my InDesign document that have space-before and space-after set on them. Some of the styles are for headers. When the headers precede a regular paragraph, I want the space to be there, but when they precede another header, I want there to be less space. In web development, I can write rules in CSS that say things like this:
p { margin-top:10px; }
h2 + p { margin-top:5px }
I am able to make the margin-top narrower on a <p> tag that is immediately preceded by an <h2> tag, but otherwise, it's wider.
I’m looking for a mechanism to do something similar in InDesign so that if my heading level 2 paragraph style is before another heading paragraph style, it has less space-after than when it is before a regular paragraph. It would be really great if Adobe could add a feature that allows you to define a paragraph style spacing based on which style comes before or after it.