Responsive rules for gallery