-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Consider rolling back the global word-break: break-word
style
#1402
Comments
Ah right. What if we set |
It looks like Personally, I'd still be in favor of not applying styles to all elements. The Maybe a more targeted style for markdown content? :where(.vp-doc) :is(h1, h2, h3, h4, h5, h6, p, li) {
overflow-wrap: break-word;
} or, if applying to table cells make sense (not sure it does for us, but I’d have to check against a bunch of content), maybe target :where(.vp-doc) :is(h1, h2, h3, h4, h5, h6, p, li, td) {
overflow-wrap: break-word;
} |
Actually stuff not inside |
I've reverted #1064. Haven't added anything new, we will discuss later what might be the best option here. |
Describe the bug
A recent update (#1064) added a
word-break: break-word
style to all HTML elements. This leads to unpleasant results such as this in table cells (see the first and last column):While before this update the result was much more readable:
Reproduction
StackBlitz reproduction with a table:
https://stackblitz.com/edit/vitepress-theme-word-break-issue?file=index.md
Expected behavior
Risky styles such as
word-break: break-word
should not be applied to all elements.Handling overflowing content (if any) should be done at the component level, probably with specific solutions for each component.
System Info
System: OS: macOS 12.6 CPU: (8) arm64 Apple M1 Memory: 117.00 MB / 8.00 GB Shell: 3.5.1 - /opt/homebrew/bin/fish Binaries: Node: 16.17.1 - /opt/homebrew/opt/node@16/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.19.1 - /Volumes/Pieces/.npm/bin/npm Browsers: Chrome: 105.0.5195.125 Firefox Nightly: 107.0a1 Safari: 16.0 npmPackages: vitepress: ^1.0.0-alpha.16 => 1.0.0-alpha.16
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: