All properties (but the `display: none`) are shared between the img and its parent, there is room for refactoring there.