Implement object-fit CSS property