-
Notifications
You must be signed in to change notification settings - Fork 133
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
Main: fix word-break issue for long words in small screens #2450
Conversation
Pre-approved upon successful review and addition of working example. |
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.
Reviewed and manually tested a very long word that was overflowing outside the main container. It does work as expected.
Propose this commit message for merging this: Patch - Core - Fix word-break issue in the main section for long words on small screens
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.
You can add an example in the "templates/content-page/conten-en.html by adding a very long word in one of the paragraph inside.
@duboisp Working example added. |
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.
Look good,
wet-boew#2450 added a CSS selector that set the word-break property to break-word anywhere within the main element. But it had unexpected side effects in certain kinds of two-dimensional content, such as tables. Specifically, it could cause wide tables (even ones situated within table-responsive containers) to divide their columns improperly - resulting in individual numbers in number groupings "splitting" across lines, columns that are too narrow to fit short words on the same line, non-breaking spaces getting ignored, etc... This resolves it by adding overrides to reset the word-break properties of any table child elements to initial. Fixes wet-boew#2466.
* Theme: Set word-break to initial for table children #2450 added a CSS selector that set the word-break property to break-word anywhere within the main element. But it had unexpected side effects in certain kinds of two-dimensional content, such as tables. Specifically, it could cause wide tables (even ones situated within table-responsive containers) to divide their columns improperly - resulting in individual numbers in number groupings "splitting" across lines, columns that are too narrow to fit short words on the same line, non-breaking spaces getting ignored, etc... This resolves it by adding overrides to reset the word-break properties of any table child elements to initial. Fixes #2466. * Update sites/baseline/_scaffolding.scss Co-authored-by: Garneauma <[email protected]> * Set word-break to initial for paragraphs in table cells * Prevents improper column division in cells containing paragraphs with long text (e.g. large dollar amounts, publication numbers, year ranges, etc...) * Retains break-word in paragraphs situated within table captions * Leverages a placeholder selector --------- Co-authored-by: Garneauma <[email protected]>
No description provided.