Skip to content

Commit 41fd2bb

Browse files
committed
Add text-pretty utility and apply to paragraphs
Introduce .text-pretty with text-wrap: pretty and apply it to the contact and about paragraphs to enable prettier wrapping.
1 parent c733bac commit 41fd2bb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/_index.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<h2 id="contact" class="mt-20 pt-8 mx-auto md:w-5/6 text-center text-xl md:text-3xl font-bold scroll-mt-24">
9595
<%= t("contact.title") %>
9696
</h2>
97-
<p class="mt-4 mx-auto md:w-7/12 text-justify leading-normal text-lg">
97+
<p class="mt-4 mx-auto md:w-7/12 text-pretty text-justify leading-normal text-lg">
9898
<%= I18n.t("contact.text", mail: link_to(data.site.contact.email, data.site.contact.email_link, class: 'whitespace-nowrap')) %>
9999
</p>
100100

@@ -103,7 +103,7 @@
103103
<h2 id="about" class="mt-8 pt-8 mx-auto md:w-5/6 text-center text-xl md:text-3xl font-bold scroll-mt-24">
104104
<%= t("about.title") %>
105105
</h2>
106-
<p class="mt-4 mx-auto md:w-7/12 text-justify leading-normal text-lg">
106+
<p class="mt-4 mx-auto md:w-7/12 text-pretty text-justify leading-normal text-lg">
107107
<%= I18n.t("about.text", \
108108
ragedevert: link_to('Rage de Vert', 'https://www.ragedevert.ch', class: 'whitespace-nowrap'), \
109109
other_orgs: link_to(t('about.other_orgs'), '#organizations'), \

source/stylesheets/site.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,10 @@ strong {
794794
white-space: nowrap;
795795
}
796796

797+
.text-pretty {
798+
text-wrap: pretty;
799+
}
800+
797801
.rounded-full {
798802
border-radius: 9999px;
799803
}

0 commit comments

Comments
 (0)