Skip to content

Commit 8962860

Browse files
committed
Fix spacing between words
1 parent 5d42c13 commit 8962860

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<img src="LOGO-DIGITALCIRCLE.png" alt="The Digital Circle">
2828
<div class="block">
2929
<h1>
30-
We love <span class="typewrite" data-period="2000" data-type='[ "permaculture. ", "open source. " ]' aria-live="polite">
30+
<span class="hello-text">We love</span><span class="typewrite" data-period="2000" data-type='[ "permaculture. ", "open source. " ]' aria-live="polite">
3131
<span class="wrap" aria-hidden="true"></span>
3232
</span>
3333
</h1>

style.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,31 +238,33 @@ p a:hover {
238238
font-weight: bold;
239239
}
240240

241-
/* Prevent the typewriter/typewrite text from wrapping unexpectedly */
242241
.typewrite {
243242
display: inline-block;
244243
white-space: nowrap;
245244
}
245+
246246
.typewrite > .wrap {
247-
white-space: pre; /* preserve intentional spaces */
247+
white-space: pre;
248248
}
249-
/* caret for the typewrite effect (moved from JS injection) */
250249
.typewrite > .wrap {
251250
border-right: 0.08em solid currentColor;
252251
}
253-
/* Keep the hello heading (and its typewrite content) on one line when space allows */
254-
/* keep the hello heading on one line when there's room; use flex to avoid inline wrapping glitches */
255252
.section.section--hello .block h1 {
256253
display: inline-flex;
257254
flex-wrap: nowrap;
258255
align-items: center;
259256
gap: 0.5rem;
260257
white-space: nowrap;
261258
}
259+
260+
.section.section--hello .hello-text {
261+
display: inline-block;
262+
margin-right: 0.5rem;
263+
}
262264
@media (max-width: 520px) {
263265
.section.section--hello .block h1 {
264266
display: block;
265-
white-space: normal; /* allow wrapping on small screens */
267+
white-space: normal;
266268
}
267269
}
268270
@keyframes cursor {

0 commit comments

Comments
 (0)