-
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
Fix text wrapping in Firefox. #7472
Conversation
This PR, maybe, fixes #6049. CC: @SuperGeniusZeb. It is a one line code change, but this change is put into a highly unscoped and generic location, so I would appreciate both lots of testing and sanity checking that there are no adverse side-effects to doing this. For reference, this is what we're using: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap We could also have used https://developer.mozilla.org/en-US/docs/Web/CSS/word-break
The only potential side-effect I can think of is about the Without that, So the Aside: |
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.
Please see comment.
@jasmussen As a side note, I noticed a couple interesting things which I think may be intentional and are likely not related to this PR at all but I thought I would point out anyway just in case:
@afercia
If a theme does not set a value for |
For now I've scoped to the block list class, and it's working for me in Firefox. Let me know if that works for you, and editor styles! |
Testing on Firefox Dev Ed, this looks good to me. Haven't found regressions on Firefox or Chrome. |
Tested on Firefox Beta, and everything seems to be working for me. |
Cool, can anyone approve this then I can merge and we can test. |
Reviewing now... |
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.
Looks good, I'm just gonna update the branch with a comment tweak then we're 👍
@@ -136,6 +136,9 @@ | |||
padding-left: $block-padding; | |||
padding-right: $block-padding; | |||
|
|||
// Break long spaceless words so they don't overflow the block. | |||
overflow-wrap: break-word; |
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 is totally correct for Firefox; we had to add this to plenty of places in the Add-ons website.
I forget if Firefox is doing the "correct", but annoying, thing here (it feels like it), but yeah… this comes up a lot 😄
@@ -136,6 +136,9 @@ | |||
padding-left: $block-padding; | |||
padding-right: $block-padding; | |||
|
|||
// Break long spaceless words so they don't overflow the block. |
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.
I'm gonna add a comma after long here, because it should have one 😄
Comment tweak pushed, merge when green! 👍 |
* 'master' of https://github.com/WordPress/gutenberg: (69 commits) fix: Show permalink editor in editor (WordPress#7494) Fix text wrapping in Firefox. (WordPress#7472) Try another approach to fixing the sibling inserter in Firefox (WordPress#7530) fix: Improve "add block" text in NUX onboarding (WordPress#7511) Implement core style of including revisions data on Post response (WordPress#7495) Testing: Add e2e test for PluginPostStatusInfo (WordPress#7284) Add end 2 end test for sidebar behaviours on mobile and desktop. (WordPress#6877) Only save metaboxes when it's not an autosave (WordPress#7502) Fix broken links in documentation (WordPress#7532) Remove post type 'viewable' compatibility shim (WordPress#7496) Fix typo. (WordPress#7528) Blocks: Remove wrapping div from paragraph block (WordPress#7477) fix: change import for InnerBlocks (WordPress#7484) Polish library just a teeeeensy bit (WordPress#7522) feat: Add snapshot update script (WordPress#7514) Display server error message when one exists (WordPress#7434) Fix issues with gallery in IE11. (WordPress#7465) Polish region focus style (WordPress#7459) Fix IE11 formatting toolbar visibility (WordPress#7413) Update plugin version to 3.1. (WordPress#7402) ...
This PR, maybe, fixes #6049. CC: @SuperGeniusZeb.
It is a one line code change, but this change is put into a highly unscoped and generic location, so I would appreciate both lots of testing and sanity checking that there are no adverse side-effects to doing this.
For reference, this is what we're using: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
We could also have used https://developer.mozilla.org/en-US/docs/Web/CSS/word-break
Screenshot: