Try to use [is_css_not_present](https://github.com/edx/edx-platform/blob/master/common/djangoapps/terrain/ui_helpers.py#L272) or [css_visible](https://github.com/edx/edx-platform/blob/master/common/djangoapps/terrain/ui_helpers.py#L529).