Skip to content
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

Feature update for the class card-img-overlay #27189

Closed
munsheerek opened this issue Sep 7, 2018 · 2 comments
Closed

Feature update for the class card-img-overlay #27189

munsheerek opened this issue Sep 7, 2018 · 2 comments
Labels

Comments

@munsheerek
Copy link

munsheerek commented Sep 7, 2018

Its a suggestion to fix the content overflowing inside the card having image overlay (https://getbootstrap.com/docs/4.1/components/card/#image-overlays).

  • At the moment,if we add more content inside .card-img-overlay class,the overlay will be broken.
    Because here the image has relative height so it would take image height.it would be nice if we give the height of the card as i mentioned in the codepen, and also give a minimum height that of image height so that we can't lose the image into smaller one.
    I will add a CodePen link with fixing the issue.I think it won't might affect other elements.
    Here's the link : https://codepen.io/munsheerek/pen/aaLgWy
    Why can you try out this method ?
@andresgalante
Copy link
Collaborator

Hi @munsheerek

You are right, the overflow on image overlay is something is a known limitation of the overlay. Your solution is really interesting and it does solve it at the price of cropping the image.

Unfornutaly object-fit is not supported by IE11: https://caniuse.com/#feat=object-fit

I'll tag this issue as an idea for v5 in case we drop IE11 support.

Having said this, I think the documentation is not clear about the limitation on the image overlay: https://getbootstrap.com/docs/4.1/components/card/#image-overlays

If you'd like to fix that it'd be awesome :)

@mdo
Copy link
Member

mdo commented Dec 15, 2018

Closing since a docs change was merged, and this isn't doable in v4.

@mdo mdo closed this as completed Dec 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants