-
Notifications
You must be signed in to change notification settings - Fork 4
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
Background image fitting content #472
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
|
|
@sdmcraft This sort of fixes the image not being the right size for its content, but with 2 pretty big caveats
|
|
@dnbute , I like the idea of using |
|
|
@sdmcraft @ehrro, so, this is sort of the best I could do, I can fine-tune the value some more but if I make it so it works at lower resolutions, it's bad on higher resolutions and vice-versa Also, this is a kinda weird use-case we have, cause I'm updating the image based on its container, container which has its height set in part by the image, so there's some circularity going on. Also also this is only for mobile |
body > main > div.with-background-image > picture img, | ||
body > main > div.with-background-image > .section-container { | ||
height: 110cqh; /* 110% of the container's height */ | ||
@container text-container (max-width: 991px) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By convention, we are following min-width
. Could you please adjust for the same? Basically make this the default style. BTW, does it make sense to have this apply to wide screens as well?
@sdmcraft I'm not sure this actually works for all use cases and I'm afraid it might break more stuff than it fixes; I'd have to test this more before I try to merge it |
@dnbute , should we bookmark this PR in the linked issue and close this if you aren't planning to take it up anytime soon? |
@sdmcraft Yeah sure, unfortunately it seems this doesn't want to behave the way I want it to, and since this is not a high priority change then yeah, we can close it and maybe take it up another time |
Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after), along with a short summary of changes:
Issue
Fixes #455
Changelog:
Test URLs:
Library
New Blocks introduced in this PR
If yes, please provide details below
Block Name : For e.g. cards
Documented in sidekick library
New variations introduced in this PR
Variation Name : For e.g. cards (grid)
Documented in sidekick library
New mixins introduced in this PR
Mixin Name : For e.g. compact, white
Documented in sidekick library