Reduce size of the visibility styles

This reduces size of the visibility styles.

Fixes #11214 and half-fixes #8869 (don't target `.hidden-*` with `display: block`).

I tested this code on Bootstrap docs locally.

### Don't merge so far!
### I'm looking for better solution.