-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 wide regression #10228
Fix wide regression #10228
Conversation
This fixes a regression where wide images would cause horizontal scrollbars. Try the demo content, for example. I will investigate why this regression happened, I suspect it was related to the side-padding normalization.
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.
Things looked great in my tests 👍 I'm curious about the reason of this regression and if we can fix the problem by removing/changing the rule that caused this problem instead of adding the additional rules. But given that this bug is very noticeable feel free to merge and we can iterate later if we find a better approach.
@@ -361,6 +361,12 @@ | |||
display: inline-flex; | |||
} | |||
} | |||
|
|||
// This resets the intrinsic margin on the figure in wide and full-wide alignments. |
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.
Do we need to apply this rules to the wide alignment? It looks like it was working as expected before and the problem only affected full alignment.
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.
Thank you Jorge for the review, but I discovered this issue was bigger than just for wide and fullwide: it's even for normal images that are inserted. We used to simply set Requesting another review because it's a biggish change. @kjellr can you look also? |
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 fixes a regression where wide images would cause horizontal scrollbars. Try the demo content in master, note that there are horizontal scrollbars. Then try this branch, note that they are gone.
The issue: the margins on the figure weren't being reset left and right on wide image.
I will investigate why this regression happened, I suspect it was related to the side-padding normalization.