I am trying to get a CSS selector to check and apply the CSS based on the condition that if: sectionContent-noToolbar
is available, then apply height:2em
As stated in another answer, there is no way to do this. To achieve the effect you wish to achieve you will need to rethink your implementation. This is because at its core, CSS is not a processed language and as such can not handle conditional statements.
In rethinking, you might look into CSS preprocessors such as LESS or SASS which seek to implement logical constructs in CSS.