Fix #11214: reduce visibility styles

Original solution doesn't work very well with table cells and rows, but this reduces the size of visibility styles.