Skip to content

Commit 79760a7

Browse files
author
Shannon Anahata
committed
making sure text wraps or flows, but never cuts off
1 parent d975e4a commit 79760a7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/components/inlineTableOfContents/style.module.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
border-left: 2px solid var(--gray-6);
77
padding-left: 1rem;
8+
padding-right: 1rem;
89
margin: 1.5rem 0;
10+
max-width: 100%;
11+
width: 100%;
912
}
1013

1114
:global(.dark) {
@@ -22,15 +25,21 @@
2225
letter-spacing: 0.5px;
2326
color: var(--title-color);
2427
margin-bottom: 0.5rem;
28+
white-space: normal;
29+
word-wrap: break-word;
30+
overflow-wrap: break-word;
2531
}
2632

2733
.inline-toc-list {
2834
list-style-type: none;
2935
padding-left: 0;
3036
margin: 0;
37+
max-width: 100%;
38+
width: 100%;
3139

3240
li {
3341
margin: 0;
42+
max-width: 100%;
3443
}
3544

3645
a {
@@ -40,6 +49,10 @@
4049
line-height: 1.8;
4150
display: block;
4251
transition: color 0.2s ease;
52+
white-space: normal;
53+
word-wrap: break-word;
54+
overflow-wrap: break-word;
55+
max-width: 100%;
4356

4457
&:hover {
4558
color: var(--link-hover-color);

0 commit comments

Comments
 (0)