-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Cornnerstone): BCTHEME-52 - Allowing carousel image to stretch distorts image #1711
Conversation
…+ _heroCarousel.scss cleared
Autotagging @bigcommerce/storefront-team @davidchin |
…essary spaces in scss disabled)
…for showing carousel after analyzing size of images)
…storts image (switch implementation)
@golcinho @BC-tymurbiedukhin |
What?
homepage_stretch_carousel_images option from config.json didn’t work. We always had streched images and homepage_stretch_carousel_images value is not affected. Now it works - I have updated carousel scss file for to fix it.
Now images are stretching when homepage_stretch_carousel_images: true and contain in case when homepage_stretch_carousel_images: false.
Tested on Chrome, Safari, Firefox, ie11, IOS Safari and Android Chrome.
compat-object-fit class didn’t add in ie11 - I have updated it and now it works. homepage_stretch_carousel_images: false mode looks fine on ie11, homepage_stretch_carousel_images: true stretching images, but images looks distorted (as it is now on prod). Maybe we can find a way to update it in other task. Carousel looks okey even on small width on ie11.
Also I added some javascript to detect vertical or square images and make them looking more nicely and informative on mobile - if image is square or vertical and it has no content block in its slide, we have space to make image wrapper higher.
Tickets / Documentation
Add links to any relevant tickets and documentation.
Ticket
Screenshots (if appropriate)
In Ticket I added videos with prefix final for both homepage_stretch_carousel_images: true and homepage_stretch_carousel_images: false modes. So you can see the implementation. On videos we have the worst case of usage - vertical images, horizontal images, some with text and some without. And all them must be good looking in one carousel
@BC-tymurbiedukhin @golcinho @junedkazi ready for your questions