Skip to content

Commit d4e3a64

Browse files
committed
fix: prevent doctor content overflow
1 parent 2531c3e commit d4e3a64

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

web-ui/styles/dashboard.css

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
flex-direction: column;
2121
gap: 8px;
2222
min-width: 0;
23+
max-width: 100%;
24+
overflow: hidden;
2325
}
2426

2527
.doctor-card:disabled {
@@ -34,7 +36,7 @@
3436
}
3537

3638
.doctor-card-meta {
37-
display: inline-flex;
39+
display: flex;
3840
align-items: center;
3941
gap: 6px;
4042
font-size: var(--font-size-caption);
@@ -44,19 +46,40 @@
4446
text-overflow: ellipsis;
4547
}
4648

49+
.doctor-card-meta span {
50+
min-width: 0;
51+
}
52+
53+
.doctor-card-meta span:not(:nth-child(2)) {
54+
flex: 1 1 auto;
55+
overflow: hidden;
56+
text-overflow: ellipsis;
57+
}
58+
4759
.doctor-card-kv {
4860
display: grid;
4961
grid-template-columns: 92px minmax(0, 1fr);
5062
gap: 8px;
5163
align-items: baseline;
5264
font-size: var(--font-size-caption);
5365
color: var(--color-text-secondary);
66+
min-width: 0;
5467
}
5568

5669
.doctor-card-kv > span:first-child {
5770
color: var(--color-text-tertiary);
5871
}
5972

73+
.doctor-card-kv > span:nth-child(2) {
74+
min-width: 0;
75+
overflow: hidden;
76+
display: -webkit-box;
77+
-webkit-box-orient: vertical;
78+
-webkit-line-clamp: 2;
79+
overflow-wrap: anywhere;
80+
word-break: break-word;
81+
}
82+
6083
.doctor-kv-error {
6184
color: #8a2f36;
6285
overflow: hidden;
@@ -145,11 +168,12 @@
145168
border: 1px solid rgba(220, 95, 108, 0.2);
146169
background: rgba(255, 255, 255, 0.75);
147170
color: var(--color-text-secondary);
171+
overflow-wrap: anywhere;
172+
word-break: break-word;
148173
}
149174

150175
@media (max-width: 520px) {
151176
.doctor-card-kv {
152177
grid-template-columns: 76px minmax(0, 1fr);
153178
}
154179
}
155-

0 commit comments

Comments
 (0)