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

fix: 🐛 Correct issue of images breaking out of content area #274

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

Herm71
Copy link
Member

@Herm71 Herm71 commented Oct 12, 2023

What does this do/fix?

Fixes #257, which describes a 🐛 wherein images that are aligned left or right (floated) break out of their binding box

QA

Links to relevant issues

Links to deployed, scaffolded demo:
N/A

Screenshots/video:

Before
bad-alignment

After
good-alignment

Again
good2-alignment

Tests

Does this have tests?

  • Yes
  • No, this doesn't need tests because it's a style change.
  • No, I need help figuring out how to write the tests.

@Herm71 Herm71 added the bug Something isn't working label Oct 12, 2023
@Herm71 Herm71 requested a review from knice October 12, 2023 15:55
@Herm71 Herm71 self-assigned this Oct 12, 2023
@knice
Copy link
Member

knice commented Oct 13, 2023

@Herm71 This looks like it will fix the problem. One question: you've included the code in the image.css block file, but the two rules as written are not specific to the image block. Seems like that will cause an issue when there is an image on a page and another block with .alignleft or .alignright classes.

If we think this is the behavior we want for any block that gets those classes (as shown here), these styles should live in a global CSS file, not a block-specific file.

@knice
Copy link
Member

knice commented Oct 13, 2023

@Herm71 ⬆️

@Herm71
Copy link
Member Author

Herm71 commented Oct 13, 2023

Ohh, I see. Yeah, I was thinking only images, and I saw we had that css already in there, so that's where I put it.

@knice knice merged commit c47264f into main Oct 26, 2023
@Herm71 Herm71 deleted the Herm71/issue257 branch October 27, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aligned images breaking out of content region
2 participants