Fix text overflow for long URLs and inline code blocks (#41064)
## Summary Long string URLs and inline code blocks can exceed page width and cause horizontal scroll overflow that breaks page layouts on smaller screens. This fix ensures those long strings can wrap down as needed to preserve the layout. The only code blocks that are affected are those that are inline span within text paragraphs and are effectively stylized text; it does not affect `<pre>` code blocks where fidelity is prioritized and contained horizontal scroll is preferred. ## Before and After Screenshots ### `/TPM2_PCR_MEASUREMENTS/` code overflow **BEFORE** <img width="400" height="770" alt="TPM2-before" src="https://github.com/user-attachments/assets/87da9d7a-d757-4fe0-9496-5c17ce31a14e" /> <br /><br /> **AFTER** <img width="400" height="770" alt="TPM2-after" src="https://github.com/user-attachments/assets/e48ba635-6c73-46a7-a29a-673a253fa76b" /> ### `/PRESET/` URL overflow **BEFORE** <img width="400" height="776" alt="PRESET-before" src="https://github.com/user-attachments/assets/da4a6346-c53b-4ce0-9ec8-8e58b634174e" /> <br /><br /> **AFTER** <img width="400" height="776" alt="PRESET-after" src="https://github.com/user-attachments/assets/be5fa824-4891-46ac-9f6e-08490cda8bd9" />
This commit is contained in:
@@ -111,6 +111,7 @@ a {
|
||||
text-decoration: none;
|
||||
color: var(--sd-link-color);
|
||||
cursor: pointer;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
@@ -567,6 +568,7 @@ tbody td {
|
||||
code.highlighter-rouge {
|
||||
padding: 2px 6px;
|
||||
background-color: var(--sd-highlight-inline-bg);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
a code.highlighter-rouge {
|
||||
|
||||
Reference in New Issue
Block a user