-
Notifications
You must be signed in to change notification settings - Fork 26
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
Respect heights #66
base: main
Are you sure you want to change the base?
Respect heights #66
Conversation
- with media-item + ignore-crops flag - respect any height values passed in, including responsive heights - with src - respect height values passed in
not sure
so need to look at if image height (ImgHeight) is provided for these use cases? It would also apply that if |
Good question! I didn't want to change the existing logic too much (because we don't use crops,doesn't mean this logic doesn't suit others!) If you think it's acceptable to change the code to always respect the height when provided - I'm happy to edit it to match that and remove the |
@AndyBoot any thoughts on this as you done the work on our:img |
Thanks @warrenbuckley for tagging me in on this. I think this PR covers a few more scenarios which weren't originally anticipated. All looks good but as @mistyn8 pointed out the introduction of a new |
I did think of doing it in the way you suggested initially, but opted for an option that won't be breaking for people when they update to the new version. As it is, it might change their crops without them realising. I agree, though, that those params should be respected and ignoring crops implied. I will proceed with:
@AndyBoot, I'm currently unable to work on it, but it's on my list. I'll tag you again when I've done the work. |
@AndyBoot, @mistyn8, @warrenbuckley we've made some progress on this in #69 Could you review that please and we can close this PR then? Thanks! |
with media-item + ignore-crops flag - respect any height values passed in, including responsive heights
This PR should help control rendered crops from
our-img
directly, instead of taking the original image's height ratio for crops (this is done using a new optional boolean/flagignore-crops
.with src - respect height values passed in
When using
src
, the heights were being ignored automatically too. This change will respect any height props passed on<our-img>
.Solves #65