Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Adjust max-width for alignaleft blocks, Clean up line breaks + center alignment for cover blocks #619

Merged
merged 4 commits into from
Nov 16, 2018

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Nov 16, 2018

Fixes #612

This PR does a few things:

  • Adjusts the max-width of all left-aligned blocks to match the max-width of all right-aligned blocks.
  • Decreases the margins for left/right cover image blocks to avoid line breaks when we don't need them.
  • Adds a hyphens: auto rule to add hyphens to line breaks (when the browser supports it)
  • Removes our aligncenter styles for the cover image block. These were trying to fix a bug in Gutenberg, which has since been fixed upstream:
    Override our global aligncenter CSS rules for the cover block gutenberg#11990

Before:
screen shot 2018-11-16 at 1 09 39 pm

After:
screen shot 2018-11-16 at 1 09 02 pm

These are attempting to fix broken Gutenberg styles, and should be fixed upstream.
This isn't used for alignright block, so it produces uneven styles.
Copy link
Collaborator

@allancole allancole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍. I tested all the Cover block combinations and they all check out. Here’s just a few:

image

@kjellr kjellr merged commit ef10487 into master Nov 16, 2018
@kjellr kjellr deleted the fix/cover-image-styles branch November 16, 2018 18:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cover blocks does not look the same in the editor and on the front.
2 participants