Skip to content

Commit 83d6961

Browse files
committed
Type Effect Fix
1 parent a13fb11 commit 83d6961

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

docs/assets/prop.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,22 @@ app-root,
155155
}
156156

157157
.type-effect {
158-
max-width: fit-content;
159158
display: inline-block;
160159
overflow: hidden;
161160
border-right: 0.15em solid var(--theme-colour);
162-
white-space: normal;
163-
animation: typing 4s steps(40, end), blink-caret 0.75s step-end infinite;
161+
white-space: nowrap;
162+
animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
163+
max-width: fit-content;
164+
box-sizing: border-box;
164165
}
165166

167+
/* Animate up to the full content */
166168
@keyframes typing {
167169
from {
168-
width: 0ch;
170+
width: 0;
169171
}
170172
to {
171-
width: 40ch;
173+
width: 100%;
172174
}
173175
}
174176

docs/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/prop.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,22 @@ app-root,
155155
}
156156

157157
.type-effect {
158-
max-width: fit-content;
159158
display: inline-block;
160159
overflow: hidden;
161160
border-right: 0.15em solid var(--theme-colour);
162-
white-space: normal;
163-
animation: typing 4s steps(40, end), blink-caret 0.75s step-end infinite;
161+
white-space: nowrap;
162+
animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
163+
max-width: fit-content;
164+
box-sizing: border-box;
164165
}
165166

167+
/* Animate up to the full content */
166168
@keyframes typing {
167169
from {
168-
width: 0ch;
170+
width: 0;
169171
}
170172
to {
171-
width: 40ch;
173+
width: 100%;
172174
}
173175
}
174176

0 commit comments

Comments
 (0)