Skip to content

Commit 0fd3ae8

Browse files
committed
feat: use text-wrap: pretty for balanced representation
1 parent 4c51e34 commit 0fd3ae8

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/Booth.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const getIcon = (name: string) => {
3030
<div class="booth-card tranition-all flex h-fit cursor-pointer gap-2 rounded-lg group" data-booth={booth.location?.split('#')[1]}>
3131
<img src={`./img/booth/${booth.name_en}.png`} alt={booth.name} class="h-16 w-16 rounded-md bg-neutral-100 object-contain p-2 group-hover:p-1 transition-all duration-300 shrink-0" />
3232
<div class="p-1 group-hover:ps-2 transition-all duration-300">
33-
<h5>{locale === 'en' ? booth.name_en : booth.name}</h5>
33+
<h5 class="text-pretty">{locale === 'en' ? booth.name_en : booth.name}</h5>
3434
<p class="m-0 text-sm text-neutral-500">{t('venue.community_booth')} {booth.location}</p>
3535
</div>
3636
<div class="modal-content hidden">

src/styles/base.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@
168168
scrollbar-color: var(--color-brand) white;
169169
@apply overflow-x-auto overflow-y-hidden;
170170
}
171+
172+
@supports not (text-wrap-style: pretty) {
173+
.text-pretty {
174+
text-wrap-style: balance;
175+
}
176+
}
171177
}
172178

173179
@keyframes pinchLoop {

0 commit comments

Comments
 (0)