-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try: Cover height fix round 2. #28455
Conversation
Size Change: -12 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
I took this for a spin and didn't find any issues. Tried themes twenty-nineteen up to twenty-twenty-one. It appears that the focal point picker issue encountered when previously removing the |
Excellent point, thank you for chiming in! 💯 |
Thank you for the follow through on this @jasmussen! I tested this and the focal picker doesn't seem to be playing nicely. With this PR checked out: If it's helpful, I verified this on master as well with the following steps:
|
d8f06dc
to
775d156
Compare
Thank you for testing, @jffng. But even after rebasing, I can't reproduce your issue, and I'm not sure why. The focal point picker is working for me both in Chrome, Firefox, Safari, with portrait and landscape images. I am seeing an issue with the focal point picker not being able to go left or right, in portrait images, but that appears to be a separate issue that's being discussed in #28487. |
775d156
to
1aee649
Compare
I gave this another spin and the issue with the focal point picker I reported above is fixed. This LGTM, thanks @jasmussen ! |
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.
Confirmed it resolves #17921 with the code posted in the description.
Thank you Alex! I'd also love a sanity check from @brentswisher as I know he's looked at adjacent things. |
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.
This looks good to me too. I'm not seeing any issues with the focal point picker in my testing. I actually don't think many of those issues were caused by the CSS changes, it just brought them to our attention. I'm hoping to be able to add some automated tests to the focal point component in the near future so making changes isn't quite so hectic!
Alternative to #28114. Maybe fixes #17921, #17919.
The problem: The Cover block has some compounding rules around height, that make it rather ill-mannered when inside a flex container. Specifically, the
height: 100%;
makes the height incorrect when inside a flex container, taking up the full height regardless of what you specifically set it to using the input field in the sidebar. That effectively pushes content off the bottom of the flex container, making it overlap adjacent content.Before:
After:
In previous attempts, a few things broke because of this:
All three appear to work just fine, with removing the height now:
So, what's different from last time we tried the exact same PR?
@ockham and @ajlende have tirelessly been refactoring the adjacent code to be more resilient. Specifically the new rules added around how the image is positioned inside the cover block, appear to have solved this. In other words, the
height: 100%;
has been removed from the cover block itself, to theimg
inside it.How to reproduce the before and after:
Paste the following into your code editor:
Initially my instinct was that this was a bug with the columns block, because after all, ideally it should be able to contain any block you throw inside it, right? But my realization was that no matter how resilient you make a container block, the CSS of a child block can make it explode if you try. In this case, the height property truly was causing issues.
To test:
Let's take it slow with this one. It's a good fix to land, but it doesn't have to happen quickly. Let's test it thoroughly, and if it passes the checks, merge it early in a cycle.
It would be good to test this branch on:
Things to look for:
As far as I can tell, this one is solid. But let's be sure!
CC: @jffng and @stokesman because you worked on an adjacent focal point picker issue.