Skip to content

Commit e97f91e

Browse files
authored
Fix rich text table formatting (#203)
1 parent b660bf0 commit e97f91e

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

components/Base/Text.vue

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ withDefaults(defineProps<BaseTextProps>(), {
5454
overflow-wrap: break-word;
5555
word-break: break-word;
5656
min-width: 0;
57+
overflow-x: auto;
5758
5859
&.color-foreground {
5960
color: var(--gray-700);
@@ -111,29 +112,19 @@ withDefaults(defineProps<BaseTextProps>(), {
111112
width: 100%;
112113
border-collapse: collapse;
113114
font-size: 0.875em;
114-
115-
display: block;
116-
overflow-x: auto;
117-
white-space: nowrap;
118-
119-
thead,
120-
tbody,
121-
tr {
122-
display: table;
123-
width: 100%;
124-
table-layout: fixed;
125-
}
126-
127-
thead {
128-
width: calc(100% - 1em); /* Account for scrollbar */
129-
}
115+
table-layout: auto;
116+
display: table;
117+
margin-block: var(--space-4);
130118
}
131119
132120
:deep(th, td) {
133121
padding: var(--space-2) var(--space-3);
134122
text-align: left;
135123
border-bottom: 1px solid var(--gray-200);
136124
word-break: break-word;
125+
overflow-wrap: break-word;
126+
white-space: normal;
127+
vertical-align: top;
137128
138129
&:first-child {
139130
min-width: 120px;

0 commit comments

Comments
 (0)