-
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
Theme: Break words in paragraphs and headings only #2467
Theme: Break words in paragraphs and headings only #2467
Conversation
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.
Btw I wanted to modify the original selector rule from For example, if the There's no way around the need for an undo override. But if there's an appetite to fix the issue + keep @Garneauma @duboisp Would you prefer that I update this PR to use the alternate way? IMO it'd be better overall, at the cost of making the first selector slightly-more complex. PS: I was originally going to cover |
This PR will probably need to be extended to cover input groups and maybe even buttons in general (e.g. Selectors that apply the |
Co-authored-by: Garneauma <[email protected]>
* 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
Revised the PR as follows:
|
#2450 added a CSS selector that set the
word-break
property tobreak-word
anywhere within themain
element.But it had unexpected side effects in certain kinds of two-dimensional content, such as tables and input groups.
Specifically:
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 reworking the selector to solely target paragraphs and headings. Paragraphs in table cells are exempted.
Fixes #2466.
CC @Garneauma @duboisp